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 ...