On Dec 31, 2003, at 8:22 AM, Randy Brown wrote:
Ah yes, now the real stumper:[..]
The line:
perl -pi -e 's/<provider-url>file:.*<\/provider-url>/REPLACED/' testfile.txt
does in fact work fine from the commandline in unix.
However, when it is called from a ksh script, it does not function. Any ideas? I have tried many possible combinations that I can think of.
Well the obvious part of the problem is
how married are you to the ksh script?
The problem you are going to be running into in these issues remains
"who did which interpolation when,
and where to what?"As well as which is the real problem that you are bumping your head into.
Allow me to illustrate:
meatbop: 60:] ./smack.ksh ./smack.ksh: Command not found. meatbop: 61:] which ksh ksh: Command not found. meatbop: 66:]
vladimir: 55:] ./smack* vladimir: 56:] cat *.ksh #!/bin/ksh
perl -pi -e 's/<provider-url>file:.*<\/provider-url>/REPLACED/' testfile.txt
vladimir: 57:] cat *.txt REPLACED vladimir: 58:]
Is the problem that you do not have ksh on the machine that you tried to run the perl in the ksh script?
since that smack.ksh has no problem running the command and doing the dance on a host where there is both perl and ksh.
ciao drieux
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
