sed Replace foo with bar in a file :) sed -i 's/foo/bar/g' /some/path/file.txt Replace "dark" or "somecrap" or "light" to "boles" sed -i 's/dark/boles/g;s/somecrap/boles/g;s/light/boles/g' /some/path/file.txt Delete line using matching patterns in a line sed -i '/pattern-to-match/d' ./some/file Mach based on part of a pattern sed -i '/backend=/c\ export backend=soemthing' somefile