RE: command line search and replace

2003-12-31 Thread Randy Brown
tions that I can think of. Thanks very much. Randy -Original Message- From: drieux [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 7:04 PM To: Perl Beginners Mailing List Subject: Re: command line search and replace On Dec 30, 2003, at 4:51 PM, Randy Brown wrote: > When

command line search and replace

2003-12-30 Thread Randy Brown
Hi all, When I try the following, perl reads the * as a literal character, instead of my intent as a global value. Anyone see what I am missing? perl -pi -e "s/file:*<\/provider-url>/REPLACED/g" testfile.txt In the file testfile.txt, the line will be something like this: file:/opt/usr/bin/so

checking if file exists on remote machine...

2002-03-29 Thread Randy Brown
I'm trying to check if a file exists on a remote machine using perl. I am unable to make this work. Anyone have any suggestions? Thanks! Randy # if source files not there, error $length=@source_file; $counter=0; print "\n\n"; while ($counter < $l

perl, remsh, and remote files

2002-03-03 Thread Randy Brown
Here's a perl question for you. I am trying to write a few lines that will run one one machine, and check if a file exists on other machines. Here is what I am thinking: $pcommand="remsh $remote_machine -l $myaccount -n if ( -e a_file);"; if ( system ($pcomma