|Perl Monk, Perl Meditation|
Re: Running a shell script from Perl, and making that shell script accept input from perl script.by jsegal (Friar)
|on Apr 08, 2008 at 23:25 UTC||Need Help??|
Which queuing system are you using? I have used SGE, which requires a shell script for submission, but it is easy enough to write a single shell script wrapper, effectively:
If you look at the shell docs, you will see that the $@ expands to all the arguments, and putting it in quotes ensures that any spaces in any of the argument values will still be quoted (i.e. they won't cause arguments to be split on spaces).
Then one can submit thusly:
If you have a submitting job and the sub jobs that need to communicate, you can still use pipes if that makes sense. And obviously if you have the proper shebang line in your perl script you don't need to call perl explicitly.
Perhaps this trick will help you think of other ways to solve your issue.