UNIX Programming, Certification, System Administration, Performance Tuning Reference Books
Edit all the Files

Ever need to edit all the files in a directory containing a particular string?

Use the -l option of grep to build a list of filenames, and use backquoting to ship that list to vi:

vi `grep -l anystring *`

Return to : Unix System Administration Hints and Tips