HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Basic Script Help
Operating System - HP-UX
1830230
Members
2330
Online
109999
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
02-27-2003 09:21 AM
02-27-2003 09:21 AM
Basic Script Help
Hi everyone;
I've been testing the following basic script on a HP 11.11 system (script name : test) :
#!/usr/bin/bash
. ./.bashrc
echo FINISH
when I launch ./test the scripts executes with no problem.
When I launch it like this ./test& the script hangs
in the background ( FINISH doen't get displayed) the command "jobs" reports the following: bash$ jobs
[1]+ Stopped ./test
when normally it should display "Done" instead of "Stopped". the hang is definitly occuring on the . ./.bashrc
On another HP 11.11 system it finishes either way I launch it. On Solaris I have no problems also.
in a script could . ./.bashrc be replaced with ./.bashrc ?
In general, if I have a script that sets some environment variables is it necessary to source the script when it's called in another script ?
Thanks for your help
I've been testing the following basic script on a HP 11.11 system (script name : test) :
#!/usr/bin/bash
. ./.bashrc
echo FINISH
when I launch ./test the scripts executes with no problem.
When I launch it like this ./test& the script hangs
in the background ( FINISH doen't get displayed) the command "jobs" reports the following: bash$ jobs
[1]+ Stopped ./test
when normally it should display "Done" instead of "Stopped". the hang is definitly occuring on the . ./.bashrc
On another HP 11.11 system it finishes either way I launch it. On Solaris I have no problems also.
in a script could . ./.bashrc be replaced with ./.bashrc ?
In general, if I have a script that sets some environment variables is it necessary to source the script when it's called in another script ?
Thanks for your help
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2003 09:33 AM
02-27-2003 09:33 AM
Re: Basic Script Help
What's in the sub-script .bashrc? Something in there is causing your hang.
>>in a script could . ./.bashrc be replaced with ./.bashrc ?
It depends... The subtle difference is that . ./.bashrc runs within your current shell so any environment changes (variables etc) will remain when it finishes. ./.bashrc runs as a seperate child process so will not change the environment in your current shell at all.
Regards,
John
>>in a script could . ./.bashrc be replaced with ./.bashrc ?
It depends... The subtle difference is that . ./.bashrc runs within your current shell so any environment changes (variables etc) will remain when it finishes. ./.bashrc runs as a seperate child process so will not change the environment in your current shell at all.
Regards,
John
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP