Linux

Find all the files which end with '.yml' and replace the number 1 in 2 in each file

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

find /some_dir -iname *.yml -print0 | xargs -0 -r sed -i "s/1/2/g"