Replace a string in a file in CLI (Command Line), Linux
April 15, 2011 1 Comment
For instance, you would like to replace ‘abc’ with ‘def’ everywhere in your file, do the following:
cat file1.txt | sed -e ‘s/abc/def/’ > file2.txt
Just a few lines of code.
April 15, 2011 1 Comment
For instance, you would like to replace ‘abc’ with ‘def’ everywhere in your file, do the following:
cat file1.txt | sed -e ‘s/abc/def/’ > file2.txt