Browse Source

fragments/pangrams/letter_freq.sh: explain exit codes

master
Brennen Bearnes 2 years ago
parent
commit
dc428ef658
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      home/fragments/pangrams/letter_freq.sh

+ 3
- 0
home/fragments/pangrams/letter_freq.sh View File

@ -66,6 +66,9 @@ if [ "$1" = '-f' ]; then
# Zero-length string for second param - didn't get a filename
echo "Expected a filename to read string from."
print_usage
# These arbitrary-seeming exit codes are taken from:
# https://www.freebsd.org/cgi/man.cgi?query=sysexits&sektion=3
# (I don't actually know whether this is a good idea.)
exit 64
fi
if [ ! -f "$2" ]; then


Loading…
Cancel
Save