//View Tip #572
» BBC Weather
» Check low space
» Mass-renaming files
» Command examples from shell-fu
Similar Tips
» Random xkcd comic» BBC Weather
» Check low space
» Mass-renaming files
» Command examples from shell-fu
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
This bit of sed will print the contents of a file until the first line which doesn't contain the specified expression. A useful alternative to 'head' when you're not sure how much of the file you need.
sed -n '/Hello/!q; p'
Comments
Add your comment
Comments are currently disabled
No Comments

