substitute strings in files
Please Register to submit score.
| Average Score | 7.0 |
| Scores Submitted | 1 |
| Date Added | Aug 24, 2005 |
| Last Updated | Aug 25, 2005 |
Introduction
to make changes in text files.
Put in file "edit-all.rb" and run with
ruby edit-all.rb *.txt
Now accepts the target and the replacement from the command line or from the keyboard.
Ruby / Rails Snippet:
substitute strings in files
Posted on Aug 24, 2005 9:28 pm
Posted on Aug 24, 2005 9:28 pm
Maybe rather than editing the code with the string and replacement string, it can accept them from the command line?
Ruby / Rails Snippet:
substitute strings in files
Posted on Aug 31, 2005 12:12 pm
Posted on Aug 31, 2005 12:12 pm
Nice, I see you've added command line support. This can be very useful.



