- 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.
推薦閱讀
- Mastering Matplotlib 2.x
- Google Cloud Platform Cookbook
- Getting Started with Clickteam Fusion
- 計算機圖形圖像處理:Photoshop CS3
- 網(wǎng)絡(luò)安全技術(shù)及應(yīng)用
- 云計算和大數(shù)據(jù)的應(yīng)用
- 啊哈C!思考快你一步
- 網(wǎng)絡(luò)存儲·數(shù)據(jù)備份與還原
- 智能制造系統(tǒng)及關(guān)鍵使能技術(shù)
- Creating ELearning Games with Unity
- 基于Quartus Ⅱ的數(shù)字系統(tǒng)Verilog HDL設(shè)計實例詳解
- 超好玩的Python少兒編程
- Flash CS3動畫制作融會貫通
- ORACLE數(shù)據(jù)庫技術(shù)實用詳解
- 深度剖析:硬盤固件級數(shù)據(jù)恢復(fù)