changing a file
Jean-Pierre Radley
jpr at jpradley.jpr.com
Fri May 31 10:56:15 AEST 1991
In article <91141.140213KJB6 at psuvm.psu.edu> KJB6 at psuvm.psu.edu writes:
>
>As a script, I would like to search a file and replace a string with
>another string. I know this can be done, but I have not figure out how to
>do it yet. Anyone have any suggestions. I think if I use awk or nawk somewhere
>along the line, I can get it done.
The answer I'd provide is not my own, it's straight out of Kernighan & Pike.
Look in their book's index for 'replace'.
(They use sed for this, since awk would work but would be overkill.)
Jean-Pierre Radley Unix in NYC jpr at jpr.com jpradley!jpr CIS: 72160,1341
More information about the Comp.unix.questions
mailing list