The newline Guide to Bash Scripting
Example Code DownloadYou can download the complete example code by clicking here.
Precedence is the same here as you might be familiar with from arithmetic. For example, multiplication has higher precedence than addition, so 2 + 3 × 4 is equal to 2 + (3 × 4), or 14. A common use case for this is to define a function with the same name as a file command to set some default options. As a quick example, here’s how we would tell `grep` to use colored output by default: