UNIX sed Commands
November 17, 2007Unix sed Commands
sed ‘s/wizard/guru/g’ file1 | replaces every occurrence of the string wizard with the string guru |
sed -n ‘s/wizard/guru/gp’ file1 | replaces and prints only those lines where the substitution was |
made -n print only when command p is given | |
sed ‘/Comment:/d’ file1 | deletes all the lines that contain Comment: from the file. sed |
writes to standard output so the original file is not changed |
https://www.bestitdocuments.com/Samples