- 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.
推薦閱讀
- PowerShell 3.0 Advanced Administration Handbook
- 計(jì)算機(jī)圖形學(xué)
- ServiceNow Cookbook
- 工業(yè)機(jī)器人現(xiàn)場(chǎng)編程(FANUC)
- DevOps:Continuous Delivery,Integration,and Deployment with DevOps
- 塊數(shù)據(jù)5.0:數(shù)據(jù)社會(huì)學(xué)的理論與方法
- C語(yǔ)言寶典
- Hybrid Cloud for Architects
- Splunk Operational Intelligence Cookbook
- 網(wǎng)中之我:何明升網(wǎng)絡(luò)社會(huì)論稿
- INSTANT Heat Maps in R:How-to
- Mastering MongoDB 3.x
- Mastering Exploratory Analysis with pandas
- Learn QGIS
- C#求職寶典