|Just another Perl shrine|
Re: perl callable from bash?by targetsmart (Curate)
|on Apr 13, 2009 at 13:45 UTC||Need Help??|
Which I at first thought had to do with not getting the variable right--- but a little detective work convinced me that what it couldn't find were the two scripts.
IMO you are wrong, if you don't have script in place, the shell script will say
IMO you have problem with arguments only, and might be some problems with the absolute path of the first and second script(as other monks mentioned).
generally if you are dealing with filenames in shell scripts, just check it existence before using it for further processing.
you can use something like
and more of this can be seen in your shell manual(the above operators are from bash manual), use those effectively to figure out whether the file exists and continue only in such case. For the script use
before calling it from your shell script.
if I write your script (shown in OP), in bash, it will be like
Hope this helps.
(again the above bash code can be written even more effectively, but that is not the point of discussion)
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.