Closed bivalence closed 6 months ago
Why do you think so? The meaning of that line, as I understand it, is:
Either the previous command is successful (exit 0) or ||
do the block (echo and exit)
However, I realized now that this is rather unusual. I think this is the common shell style, but it is different from what you'd write in most languages and so it is confusing.
I changed the code in the post and added some explanation.
Thanks for your comment!
closing for lack of additional comment.
In this post:
https://code-maven.com/bash-getopt-processing-command-line-arguments
this line in the examples/shell/cli.sh script (line 6 of the script):
should be:
Thanks for posting the example; it was helpful.