2013年1月2日 星期三

SED: Ranges by patterns

Sed - An Introduction and Tutorial: Ranges by patterns
http://www.grymoire.com/Unix/Sed.html#uh-29

Delete all the lines started from line matches "start" to the line matches "end":

sed -e '/start/,/end/d'
Delete the line that matches "start" and 1 line following it:
sed -e '/start/,+1d'

沒有留言: