//View Tip #818
Similar Tips
» iso2cd
» List non-system users
» List only the files that have been updated today.
» Count files by type v2
» Kill matching processes


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
The awk command below will print out the first line of each paragraph in a file. Paragraphs must be separated by a blank line for this to work.

awk 'NR==1||cnt-->0;/^$/{cnt=1}' file.txt

View Comments »


Add your comment

Comments are currently disabled
No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit