I need help creating a shell script to search .yml files in a specific folder for a line containing money: and then replacing that line with money: 1000


You could try sed. E.G:

sed -i 's/\(.*money:.*\)/money: 1000/g' somefile.yml
  • Thanks that worked perfectly. I appreciate the quick answer. – era878 May 12 '12 at 6:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.