SED help

mark m.roth2006 at rcn.com
Wed Feb 13 01:50:21 UTC 2008


Scott Ruckh wrote:
> I would like to do the following SED replacement, but I am not having much
> luck and thought I would ask for help.
> 
> TEXT1="some-text a.b.c.d a.b.c.d a.b.c.d a.b.c.d"
> TEXT2="some-text 1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4"
> 
> sed -i "s/$TEXT1/$TEXT2/g" $INFILE
> 
> ;a.b.c.d are unknown IP Addresses.

I believe, given what you say above, that you'd get
some-text 1111 1111 1111 1111

	mark




More information about the redhat-list mailing list