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
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
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
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