Change your line to ...
perl -p -i -e "s/username\/password as SYSOPER/username\/##### as SYSOPER/g" <test.dat >test1.dat
Rentachintala, Jagan wrote:
Hi,
I am getting the following error. Do you have any idea?
Can't do inplace edit without backup.
Thanks Jagan Rentachintala | Consultant | Idea Integration | (904) 360-2421 | www.idea.com | (NYSE: MPS) Idea Integration, An MPS Group Company - IT solutions from the desktop to the data center. ________________________________
-----Original Message-----
From: Jean-Sébastien Guay [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 7:53 PM
To: Rentachintala, Jagan
Cc: "José J. Cintrón"; beginners@perl.org
Subject: Re: Password
Hi Jagan,
perl -p -i -e 's/username\/password as SYSOPER/username\/##### as
SYSOPER/g'
test.dat
Can't find string terminator "'" anywhere before EOF at -e line 1. is the error I am getting
On Windows the single quote is not a valid quoting character for the shell (cmd.exe or command.com). Replace the single quote with a double quote and it should work fine.
perl -p -i -e "s/username\/password as SYSOPER/username\/##### as SYSOPER/g" test.dat
The problem happens when your Perl code contains quotes as well, but that's another topic... :-)
HTH,
J-S
--
+------------------------------------------ | José J. Cintrón - <[EMAIL PROTECTED]> +------------------------------------------
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>