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 as

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 the

RE: sed to replace the words

2003-03-11 Thread Michael K. Smith
Does it have to be sed specifically? How about: cat test.sed | awk '{print $2,$1}' newfile Mike Michael K. Smith NoaNet 206.219.7116 (work) 206.579.8360 (cell) [EMAIL PROTECTED] http://www.noanet.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL