//View Tip #818
Similar Tips
» Get an ordered list of subdirectory sizes
» See your favorite commands
» Check low space
» iso2cd
» Graph connections to hosts


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