3 ms·
All is now clear, thanks to both parent posts keith@lavazzared:~$ cat bash.txt | ./wordc.sh 10 4200 the 1822 is 1251 to 1221 a
by keithpeter 9y ago
All is now clear, thanks to both parent posts
keith@lavazzared:~$ cat bash.txt | ./wordc.sh 10
4200 the
1822 is
1251 to
1221 a
1147 of
869 if
804 and
570 in
567 shell
562 command
- lesserknowndan 9y agoThis comment thread suggests that Knuth's approach is better, i.e., the shell script version doesn't really explain why, what, or how it is doing what it is doing. It could have been improved by being written in a literate style that explains how each UNIX command line tool is being used and why; and would have executed in exactly the same way.