Iterating Over Arguments in Bash
| bashArguments can be accessed using $@
. In contrast to $*
, $@
correctly parses quoted arguments. Given the following script name args.sh
:
Running this script with the following arguments yields:
Pretty useful for scraping stuff, creating conditional directories, renaming files, etc…