Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
i am having a simple shell script in which i check which operating system i am in and then depending of that i try to execute a perl script
my shell sctipt looks like
echo $OSTYPE sac=$OSTYPE if [ $sac = linux ]||[ $sac = solaris ]; then eval 'exec perl Script1.pl –x -S $0 ${1+"$@"}' else eval 'exec perl Script2.pl –x -S $0 ${1+"$@"}' fi
i want to pass all my command line arguments frm shell to perl program.
i will execute my shell script with
./shellscript -rtos -file test1.
is the was i am doing is correct and will it pass all my arguments also because here i am gettign message like ...
Can't open perl script "Script1.pl": No such file or directory even though it is present there is same folder as shell script
20060328 Janitored by Corion: Added formatting, code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: execute perl script frm shell script
by Corion (Patriarch) on Mar 28, 2006 at 06:53 UTC | |
|
Re: execute perl script frm shell script
by graff (Chancellor) on Mar 28, 2006 at 08:47 UTC | |
by Anonymous Monk on Mar 28, 2006 at 09:25 UTC | |
by jonadab (Parson) on Mar 28, 2006 at 12:33 UTC | |
by graff (Chancellor) on Mar 28, 2006 at 10:40 UTC | |
|
Re: execute perl script frm shell script
by zer (Deacon) on Mar 28, 2006 at 06:57 UTC | |
by davidrw (Prior) on Mar 28, 2006 at 15:08 UTC |