On Fri, 2002-06-14 at 09:29, Shaw, Marco wrote:
> I'm trying to use sed to do something like:
>
> # sh function.sh "something = yes" "something = no" file
> # cat function.sh
> #!/bin/sh
> # this is function.sh
>
> function ( ) {
> sed 's/$1/$2/g' $3 > $3.tmp
> }
>
> function
> # end of functio
loose the quotes, they force literal.
sed s/$1/$2/g $3 > $3.tmp
steve
-Original Message-
From: Shaw, Marco [mailto:[EMAIL PROTECTED]]
Sent: 14 June 2002 15:29
To: '[EMAIL PROTECTED]'
Subject: sed scripting
I'm trying to use sed to do something like:
# sh function.s
I'm trying to use sed to do something like:
# sh function.sh "something = yes" "something = no" file
# cat function.sh
#!/bin/sh
# this is function.sh
function ( ) {
sed 's/$1/$2/g' $3 > $3.tmp
}
function
# end of function.sh
I want to give 3 arguments to the script function.sh, then have thes