Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Call Perl Scripts from Other Dir in Linux, Path Messed Up
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Public Interest, post: 4746393"] I followed your instruction as sh -x RUN.sh but except it prints something extra as + perl 111.pl + perl 222.pl , it is the same as sh RUN.sh I can run perl anywhere, so I think perl is in my path in my abc.pl file, I "open (INPUT "input.txt")", so if the input file sits right with the .pl file, and it works perfectly if I call from the same dir. but not from other dirs my file system: /perlfiles/111.pl /perlfiles/222.pl /perlfiles/333.pl /perlfiles/abc.pl /perlfiles/input.txt /perlfiles/RUN1.sh /RUN2.sh at /perlfiles/ "sh RUN1.sh" OK "RUN1.sh" bash: RUN1.sh: command not found at / "sh /perlfiles/RUN1.sh" file input.txt not found in abc.pl "sh RUN2.sh" file input.txt not found in abc.pl What I think I can do is I CD to the path in RUN2.sh and run the script, and CD back to the default dir. But it seems other better ways to do it. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Call Perl Scripts from Other Dir in Linux, Path Messed Up
Top