-----Original Message-----
From: Jeff Pang [mailto:[EMAIL PROTECTED]
Sent: Friday, August 10, 2007 10:54 AM
To: [email protected]
Subject: Re: Find and replace from CSV
-----Original Message-----
>From: Jeff Pang <[EMAIL PROTECTED]>
>#!/bin/sh
>FILE=$1
>REPLACED=$2
>REPLACEMENT=$3
>
>perl -pi.bak -e 's/\Q$REPLACED\E/$REPLACEMENT/' $FILE echo "DONE"
>
Found the problem,here shell variables can't be passed into Perl
program.
Maybe using environment variables,or better solution?
#!/bin/sh
FILE=$1
export REPLACED=$2
export REPLACEMENT=$3
perl -pi.bak -e 's/\Q$ENV{REPLACED}\E/$ENV{REPLACEMENT}/' $FILE
echo "DONE"
--
Jeff Pang <[EMAIL PROTECTED]>
http://home.arcor.de/jeffpang/
This is also not working
I have also tried
X="Hi"
Export $X
Perl -e 'print $ENV{x}'
But it also do not works !
Can u ppl give some other idea as I too want to call perl script from
within the shell progs.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
This message is intended only for the personal and confidential use of the
designated recipient(s) named above. If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited. This
communication is for information purposes only and should not be regarded as an
offer to sell or as a solicitation of an offer to buy any financial product, an
official confirmation of any transaction, or as an official statement of Lehman
Brothers. Email transmission cannot be guaranteed to be secure or error-free.
Therefore, we do not represent that this information is complete or accurate
and it should not be relied upon as such. All information is subject to change
without notice.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/