Browse Source

fragments/pangrams/letter_freq.sh: explain exit codes

Brennen Bearnes 2 months 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
66 66
     # Zero-length string for second param - didn't get a filename
67 67
     echo "Expected a filename to read string from."
68 68
     print_usage
69
+    # These arbitrary-seeming exit codes are taken from:
70
+    # https://www.freebsd.org/cgi/man.cgi?query=sysexits&sektion=3
71
+    # (I don't actually know whether this is a good idea.)
69 72
     exit 64
70 73
   fi
71 74
   if [ ! -f "$2" ]; then

Loading…
Cancel
Save