https://mywiki.wooledge.org/FullBashGuide
Because that is a pretty amazing resource.
https://mywiki.wooledge.org/FullBashGuide
Because that is a pretty amazing resource.
- It is more relevant for scripting than the interactive command line. For example, it includes
- I've taken a lot of care to write non-trivial example code, which is useful to show when and where constructs are useful, and which other constructs they are usually used with. For example, the argument parsing part shows not just how to use `getopt`, but also how it's meant to be used with `eval`, `unset`, `while`, `case`, and `shift`; the standard `--` option/argument separator; how to handle unimplemented options (anything mentioned by `getopt` but not matched by any `case` statements); and how to deal with the remaining arguments.
- The non-trivial code has been linted using `shellcheck` and a lot of it is tested with `shunit2` (533 lines of tests in total, which are included as a download).