Using `sed` to find and replace in file
sed = Stream EDitor
sed find and replace text
Find and replace text and save to new file
Note:
s/
means substitute/g
means global replace
Can change delimiter /
to something else:
/
to something else:Find and replace in the line contains something
In this example only find the word love
and replace it with the sick
if line content a specific string such as FOO
Find and replace multiple files in sub-folder
-i
to save the temporary file
PreviousMacOS's Touch ID on TerminalNextMerging contents of multiple .csv files into single .csv file
Last updated