I've never heard of a shell that doesn't like that, nor
of a shell that has "error unrecognised command" as an
error message. And it isn't a Perl error either.
Are you sure the problem is with the shell? In that case,
you should probably go to a newsgroup discussing the shell
you are using. Or could it be that it's actually the program
that is generating is error message?
Abigail | [reply] |
AM,
I agree with Abigail and as a point if the code is too long
to include here than your trying to do too much at once. Are you able
to reduce the long code to a much shorter version that also
replicates the problem? You may find that exercise will help
you fix the problem. If you're able to reduce and still not
find the answer, then re-post with the shorter version.
-derby | [reply] |
Are you limited to just editing the shell script, or can
you change the perl script in question as well?
At the point when you start the shell script, do you already
know what numeric value you want to supply to the final
perl script?
Is there a compelling reason to use a shell script to invoke
all those perl scripts, as opposed to using a perl script to
run them all?
If you can modify the final-step perl script in the set,
and if you know the value you want before you start the shell
script, make that last perl script look for a command-line
arg to get its numeric
value, and supply it up front when running the shell script.
Better yet, use Perl instead of shell to run everything,
and in the case of the last script, start it like this:
open(LAST, "|last_script.pl");
print LAST "$numeric_param\n";
close LAST;
This way, at whatever point is suitable before running this
last step, you can assign a
suitable value to $numeric_param, using whatever perl input
method suits you (hard coded, command-line arg, user input
on stdin, reading results of some previous step in the chain,
checking localtime, ... or any combination thereof), and
you don't have to edit that particular perl script, either.
| [reply] [d/l] |