replace using sed code example
Example 1: linux replace string in all files
sed -i 's/old-text/new-text/g' input.txt
Example 2: sed replace in file
sed -i 's/foo/bar/g' hello.txt
Example 3: replace using sed
sed -i -e 's/old-text/new-text/g' text.txt
Example 4: bash find and replace all files with specifc name with another file
find . -name "boom.txt" -exec cp ~/replace.txt {} \;
Example 5: bash search and replace text in file
awk '{gsub(regex, substitution_text, $field#); print $0;}' input_file
awk '{gsub(" ","",$0); print $0;}' input_file