alter file with sed

From thelinuxwiki
Revision as of 14:43, 1 March 2019 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

permanently alter file

sed -i expression filename


examples

delete lines containing word exit in bash history file

$ sed -i '/^exit$/d' ~/.bash_history