I started to write something real but figure this is probably for an assignment. No?
Google for combinations of "awk manpage getline manual". You're bound to find bunches available for ethereal. The worst part is that it's old-school and a bit different. Doing what you want is a breeze though.
Start simple. Suck in a fixed file of a few lines and see how the field printing works. Move to input from a pipe and build from there. Before perl arrived, awk & sed were required for survival. Easy stuff. You'll blow through it.
__________________
There are a vast number of people who are uninformed and heavily propagandized, but fundamentally decent. The propaganda that inundates them is effective when unchallenged, but much of it goes only skin deep. If they can be brought to raise questions and apply their decent instincts and basic intelligence, many people quickly escape the confines of the doctrinal system and are willing to do something to help others who are really suffering and oppressed." -Manufacturing Consent: Noam Chomsky and the Media, p. 195
|