October 2001
Beginner
1024 pages
25h 8m
English
One of the original design goals of UNIX at AT&T was for processing of text data. UNIX and FreeBSD include a large number of commands for processing text data from the command line. I'm not going to try to cover every single command available, but I am going to cover the most useful ones.
Use the wc command to count the number of lines, words, and characters in a text file. With no options, it will give all three. For example, the following tells me that there are 1160 lines, 7823 words, and 51584 characters currently in the text file that contains this chapter of the book:
$ wc fbu8mcu
1160 7823 51584 fbu8mcu.html
wc supports the -l option to only display number of lines, the -w
Read now
Unlock full access