Replacing a string with another in a text file using sed

sed -i ‘s/old-test/new-text/g’ filename

This replaces the word old-test with the word new-text in the file named filename.

Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a comment