-bash-4.3$ ls -l *.txt -rw-r--r-- 1 mikec faculty 5 Feb 6 17:18 abcd.txt -rw-r--r-- 1 mikec faculty 5 Feb 6 17:23 cdef.txt -r--r--r-- 1 mikec faculty 0 Feb 6 17:08 nowrite.txt [notice: no write permission] -bash-4.3$ cat abcd.txt abcd -bash-4.3$ cat cdef.txt cdef -bash-4.3$ ./counts abcd.txt Code Char Count ---- ---- ----- 10 LF 1 97 a 1 98 b 1 99 c 1 100 d 1 ----- Total 5 -bash-4.3$ ./counts abcd.txt cdef.txt Code Char Count ---- ---- ----- 10 LF 2 97 a 1 98 b 1 99 c 2 100 d 2 101 e 1 102 f 1 ----- Total 10 -bash-4.3$ ./counts abcd.txt cdef.txt -o results.txt -bash-4.3$ cat results.txt Code Char Count ---- ---- ----- 10 LF 2 97 a 1 98 b 1 99 c 2 100 d 2 101 e 1 102 f 1 ----- Total 10 -bash-4.3$ ./counts -o interactive.txt Typing now ... ^d next line -bash-4.3$ cat interactive.txt Code Char Count ---- ---- ----- 10 LF 2 32 SPC 4 46 . 3 84 T 1 94 ^ 1 100 d 1 101 e 2 103 g 1 105 i 2 108 l 1 110 n 4 111 o 1 112 p 1 116 t 1 119 w 1 120 x 1 121 y 1 ----- Total 28 -bash-4.3$ ./counts MSG1.txt bad file: MSG1.txt -bash-4.3$ ./counts msg1.txt MSG2.txt bad file: msg1.txt -bash-4.3$ ./counts -o nowrite.txt bad file: nowrite.txt -bash-4.3$ ./counts -x results.txt bad option: -x -bash-4.3$ ./counts -o missing output file -bash-4.3$ ./counts -ofilename missing output file