- Bash Quick Start Guide
- Tom Ryder
- 194字
- 2021-07-23 16:58:54
Bash-specific features
In addition to all the POSIX shell script features in the previous section, Bash adds many extensions that make programming more convenient, expressive, and sometimes less error-prone. These include:
- Named array variables. This is perhaps the most important advantage over the plain POSIX shell script. It makes many otherwise impractical things possible. If you need one single reason to use Bash, this is probably it!
- An easier syntax for performing conditional tests. This is also a very important feature.
- Extended globs for advanced pattern-matching.
- Regular expression support, for performing the most powerful kind of text-pattern-matching, when even globs won't do.
- Local variables for functions, a limited kind of variable scope.
- A C-style for loop syntax.
- Several kinds of parameter expansion, including case transformation, array slices, substrings, substitution, and quoting.
- Arithmetic expressions, for conveniently testing the outcome of arithmetic operations.
- Many more shell options to control shell script and interactive shell behavior, including extra debugging support.
- Better support for irregular filenames and unusual line separators in data.
All of these features are also discussed in this book. Where relevant, we will specify which features are POSIX-specific and which features are specific to Bash.
推薦閱讀
- Hands-On Artificial Intelligence on Amazon Web Services
- Seven NoSQL Databases in a Week
- WOW!Illustrator CS6完全自學(xué)寶典
- 手把手教你學(xué)AutoCAD 2010
- Java開(kāi)發(fā)技術(shù)全程指南
- 電腦上網(wǎng)直通車(chē)
- Implementing Oracle API Platform Cloud Service
- JavaScript典型應(yīng)用與最佳實(shí)踐
- Deep Reinforcement Learning Hands-On
- Building a BeagleBone Black Super Cluster
- Spatial Analytics with ArcGIS
- Visual Studio 2010 (C#) Windows數(shù)據(jù)庫(kù)項(xiàng)目開(kāi)發(fā)
- Learn Microsoft Azure
- 51單片機(jī)應(yīng)用程序開(kāi)發(fā)與實(shí)踐
- 運(yùn)動(dòng)控制系統(tǒng)