//View Tip #487
Similar Tips
» Using sed across multiple lines
» Command examples from shell-fu
» Copy and paste from the command line
» Remove comments and blank lines
» Convert permissions to octal


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
Print the contents of a file from a given regular expression to another

sed -n '/start/,/end/ p' file

This will print the contents of the file from the line that matches /start/ until the line that matches /end/

View Comments »


Add your comment

Comments are currently disabled
No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit