developerWorks: Reading Text Streams in Chunks With head and tail
Nov 26, 2002, 02:30 (0 Talkback[s])
(Other stories by Jacek Artymiak)
How to Help Your Business Become an AI Early Adopter
Suppose you want to process only a part of some file, say a few
lines from the start or end of it. What can you do? Use either head
(which sends the first 10 lines to the standard output) or tail
(which sends the last 10 lines to the standard output).
"You can change the number of lines that these commands send to
their standard output with the -n option (of course, your results
will vary depending on the contents of your XF86Config file).."