Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 2 down vote accepted

You could try sed. E.G:

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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