for file in `ls`; do echo "Original - $file"; cat $file; cat $file | sed -e '/This is the third line/d' > .$file.tmp; echo "Changed - $file"; cat .$file.tmp; done
Original - BAR
This is the sixth line
This is the seventh line
This is the third line
This is the tenth line
Changed - BAR
This is the sixth line
This is the seventh line
This is the tenth line
Original - FOO
This is the first line
This is the second line
This is the third line
This is the fourth line
Changed - FOO
This is the first line
This is the second line
This is the fourth line
The Multi-File Search option in TextWrangler (a freeware text editor) will allow you to replace text within a bunch of files.
That's cool. Does it then open those files to chang the text string?