9951 explained code solutions for 126 technologies


bashHow to search and replace strings in file


sed -i 's/search_string/replace_string/' file.txtctrl + c
-i

this option will make changes right in the original file

search_string

string to search in file

replace_string

string to replace in file

file.txt

name of the file to do search/replace in