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:
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.open(LAST, "|last_script.pl"); print LAST "$numeric_param\n"; close LAST;
In reply to Re: shell scripts + user response
by graff
in thread shell scripts + user response
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |