Replace a string in files in all dir and sub dirs

Hello,

I need to replace xml version='1.1' with xml version='1.0' in all xml files under /app/jenkins/ in all dir and sub dirs in my CentOS VM, I tried below command but it didn't help, looks like I'm missing a character somewhere.

grep -rl "xml version='1.1'" . | xargs sed -i 's/"xml version=\'1\.1\'"/"xml version=\'1\.0\'"/g'
grep -rl "xml version='1.1'" . | xargs sed -i 's/xml version='\'1\.1\''/xml version='\'1\.0\''/g'

Note that if no files are returned from the grep , sed will print: sed: no input files

Except for the recursivity with the -r option, I presume you use grep for the benefit of reducing file I/O as

(c.f. man grep ) with the -l option. While for large files with the search pattern towards the top, this is worthwhile, it is not if you have many small files, which you then have to open twice, once for grep , and once for sed .
Try

sed "/xml version='1\.1'/ s//xml version='1.0'/g" * 

as within double quotes, single quotes lose their special meaning.