As sed'om to find the value of AAA in the file and this line replace the value of BBB to CCC?

Is it possible to do it only with sed?
Other options are welcome!
June 27th 19 at 15:09
1 answer
June 27th 19 at 15:11
sed -i '/aaa/s/bbb/ccc/g' file.txt
if 1 file then so, but if all the files from the current directory and above

find . -name 'file.txt' -exec sed -i 's/log_errors = Off/log_errors = On/g' "{}" \;

well, only with your choice. - Lavern_Schuppe commented on June 27th 19 at 15:14
Yes, in modern versions of bash have already been working globbing for directories, in principle, find no longer needed.

sed -i 's/a/b/g;' **/*.txt - Maximo.Von commented on June 27th 19 at 15:17
at the bash there is no hope, the default terminals in sh ;( - Lavern_Schuppe commented on June 27th 19 at 15:20

Find more questions by tags Linuxbashsed