-bash-4.3$ ./counts This time I am typing in the text directly. On the next run I will use the redirection arrow to redirect sample.txt instead. Here I must enter ctrl-D (after a newline) to end the input. Here I go: Code Char Count ---- ---- ----- 10 LF 3 32 SPC 35 40 ( 1 41 ) 1 45 - 1 46 . 4 58 : 1 68 D 1 72 H 2 73 I 4 79 O 1 84 T 1 97 a 6 99 c 4 100 d 5 101 e 25 102 f 1 103 g 2 104 h 5 105 i 12 108 l 6 109 m 4 110 n 12 111 o 5 112 p 3 114 r 13 115 s 5 116 t 22 117 u 4 119 w 3 120 x 3 121 y 2 ----- Total 197 -bash-4.3$ ./counts < sample.txt Code Char Count ---- ---- ----- 10 LF 21 32 SPC 194 34 " 2 38 & 1 39 ' 5 44 , 14 45 - 3 46 . 22 48 0 2 50 2 1 54 6 1 58 : 3 65 A 3 67 C 3 71 G 1 72 H 1 73 I 13 78 N 2 79 O 1 80 P 1 83 S 1 84 T 2 87 W 4 89 Y 1 97 a 61 98 b 6 99 c 26 100 d 30 101 e 101 102 f 10 103 g 21 104 h 33 105 i 46 106 j 4 107 k 8 108 l 35 109 m 21 110 n 61 111 o 78 112 p 22 113 q 1 114 r 45 115 s 40 116 t 95 117 u 30 118 v 9 119 w 17 121 y 20 122 z 2 ----- Total 1124