3 ms·
I agree, Greg's Wiki has a lot of amazing content. Certainly there will be a bit of overlap, but the focus of the book is a bit different: - It is more relevan
by l0b0 5y ago
I agree, Greg's Wiki has a lot of amazing content. Certainly there will be a bit of overlap, but the focus of the book is a bit different:
- 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).