Pure awk or do you want to wrap an awk line in a shell script?
I mean like...
wipe outfile
linecount=0
limit=100
while (read from input to EOF) or (linecount > limit)
do
awk '{print $1}' >> outfile
increment linecount
done
Obviously not real. Doesn't handle file rotation/naming either.
__________________
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
|