sed '/mypattern/d' file
Deletes all lines that contain the regular expression “mypattern”.
In-place replacement:
sed --in-place '/mypattern/d' file1
sed also supports making backups with e.g. –in-place=.backup .
sed '/mypattern/d' file
Deletes all lines that contain the regular expression “mypattern”.
In-place replacement:
sed --in-place '/mypattern/d' file1
sed also supports making backups with e.g. –in-place=.backup .
This entry was posted on Saturday, June 27th, 2009 and is filed under fun with Linux. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.
Fusion theme by digitalnature | powered by WordPress
Entries (RSS) and Comments (RSS) ^
Recent Comments