On Tue, 17 Feb 2004, Saint Aardvark the Carpeted wrote:
Jack L. Stone disturbed my sleep to write:
This would be the steps:
- grep(1) the new string and pipe to sed(1) ..??
- sed(1) to find the old string replace with the new string in a file.
Am I on the right track??
I think
Sorry if this is somewhat OT, but I *think* I have a simple SED(1)
question for those familiar with its use.
I am working up a small script that will grep(1) a string like 215 new
messages from a file for use as a variable. I need to then find/replace
an old string in another file that may say
Jack L. Stone disturbed my sleep to write:
This would be the steps:
- grep(1) the new string and pipe to sed(1) ..??
- sed(1) to find the old string replace with the new string in a file.
Am I on the right track??
I think so, yeah -- something like this should work:
#!/bin/sh