sed is a powerfull tool and you can find all details from here
delete a line containing a substring ("pattern")
sed -i '/pattern/d' filereplace a stringsed -e s/pattern//g -i fileusing i.backup will keep a backup file of original and it is safer.
sed -e "s/pattern//g" -i.backup file
No comments:
Post a Comment