[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OT: sed help



sorry for this OT question regarding sed.

I'm trying to take command line user input and pipe it to sed for
parsing.  currently i have this


[joshua:] vi test
#!/bin/sh
VALUE1=$1
VALUE2=$2

echo $VALUE1 $VALUE2 > text.tmp
sed 's/$VALUE1/$VALUE2/' text.tmp > textfile

for some reason this doesn't work when I try

[joshua:] sh test test1 test2

any ideas why?  I'm certainly no sed expert as many can see.  What would
be the easiest way to implement this?

- James



Visit your host, monkey.org