- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Paths After Shebang
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2009 06:17 PM
тАО05-19-2009 06:17 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2009 06:37 PM
тАО05-19-2009 06:37 PM
Re: Paths After Shebang
check the perl actual path with below command.
which perl
and then set path with below command
export PATH=/usr/bin/perl:$PATH
here my perl is installed in /usr/bin/perl
thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2009 10:48 PM
- Tags:
- env
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 01:41 AM
тАО05-20-2009 01:41 AM
Re: Paths After Shebang
Most commonly, you declare '#!/usr/bin/perl' in your scripts and simply symlink the Perl binary accordingly. This allows your scripts to make a static declaration while your binaries are installed in various subdirectories of '/opt' or '/usr' as your needs dictate. As Dennis noted, the approach taken is to use '#!/usr/bin/env perl'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 12:38 PM
тАО05-21-2009 12:38 PM
Re: Paths After Shebang
This is mentioned in exec(2):
When the script file is executed, the system executes the specified interpreter as an executable object file. ... no path searching is done of the interpreter name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 01:11 PM
тАО05-21-2009 01:11 PM
Re: Paths After Shebang
You can limit your script's options a bit by using the "#!/usr/bin/env" shebang tecnhique.
For example attempting to add runtime options when the interpreter is explicitly specified will work:
#!/usr/bin/perl -l
...BUT _FAIL_ when written as:
#!/usr/bin/env perl -l
...since "perl -l" is passwd as one argument leading to the error:
No such file or directory: perl -l
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 04:03 PM
тАО05-21-2009 04:03 PM
Re: Paths After Shebang
That's what I was trying to say. It is all explained in exec(2):
http://docs.hp.com/en/B2355-60130/exec.2.html