Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.