Re: sed to replace the words

2003-03-12 Thread Dean Strik
Kok Kok wrote: Hi all I have question how to replace words using sed ./script 61.100 192.168 The script is #!/bin/sh sed -e 's/$2/$1/g' file newfile The problem is 192.168 can't replace 61.100 in the newfile The single quotes prevent interpolation, the $... are not treated

Re: sed to replace the words

2003-03-12 Thread Dean Strik
Dean Strik wrote: Kok Kok wrote: Hi all I have question how to replace words using sed ./script 61.100 192.168 The script is #!/bin/sh sed -e 's/$2/$1/g' file newfile The problem is 192.168 can't replace 61.100 in the newfile The single quotes prevent

Re: sed to replace the words

2003-03-12 Thread Giorgos Keramidas
On 2003-03-12 01:16, Kok Kok [EMAIL PROTECTED] wrote: Hi all I have question how to replace words using sed ./script 61.100 192.168 The script is #!/bin/sh sed -e 's/$2/$1/g' file newfile The problem is 192.168 can't replace 61.100 in the newfile . The sed utility won't see

sed to replace the words

2003-03-11 Thread Kok Kok
Hi all I have question how to replace words using sed ./script 61.100 192.168 The script is #!/bin/sh sed -e 's/$2/$1/g' file newfile The problem is 192.168 can't replace 61.100 in the newfile Please help Thank you

RE: sed to replace the words

2003-03-11 Thread Michael K. Smith
PROTECTED] On Behalf Of Kok Kok Sent: Tuesday, March 11, 2003 10:17 PM To: [EMAIL PROTECTED] Subject: sed to replace the words Hi all I have question how to replace words using sed ./script 61.100 192.168 The script is #!/bin/sh sed -e 's/$2/$1/g' file newfile The problem