HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem with Exporting a varaible from shell s...
Operating System - HP-UX
1826214
Members
3135
Online
109691
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
12-13-2005 11:34 PM
12-13-2005 11:34 PM
Problem with Exporting a varaible from shell script
Hi all,
I am having the below problem in my HPUX machine.
I have an Shell script which is having some automation code. The code has a line like below.
PROJECT=MIT
export PROJECT
After running the above script I have to run one more script in which PROJECT variable will be used. But at this point I am getting blank value for PROJECT variable.
But when I set that variable from $ prompt, then it is working fine. I have tried as administrator also.
Could anyone help me to solve the above problem.
I am having the below problem in my HPUX machine.
I have an Shell script which is having some automation code. The code has a line like below.
PROJECT=MIT
export PROJECT
After running the above script I have to run one more script in which PROJECT variable will be used. But at this point I am getting blank value for PROJECT variable.
But when I set that variable from $ prompt, then it is working fine. I have tried as administrator also.
Could anyone help me to solve the above problem.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2005 11:37 PM
12-13-2005 11:37 PM
Re: Problem with Exporting a varaible from shell script
http://www.tinker.ncsu.edu/LEGO/shell_help.html
Please refer this link, it should helpful
-Arun
Please refer this link, it should helpful
-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2005 11:53 PM
12-13-2005 11:53 PM
Re: Problem with Exporting a varaible from shell script
Hi,
it's a normal behavior : when you call a script from the command line a new shell is invoked to execute it. So the environnement wich you modify is that of the new shell.
To have current shell environnement modified by your script, simply invoke it with . (point)
For exemple, if your script's name is foo, and you are in the directory where foo reside, type :
. ./foo
Or if foo is /tmp/foo, type :
. /tmp/foo
Hope this will help
Eric
(PBFWME;)
it's a normal behavior : when you call a script from the command line a new shell is invoked to execute it. So the environnement wich you modify is that of the new shell.
To have current shell environnement modified by your script, simply invoke it with . (point)
For exemple, if your script's name is foo, and you are in the directory where foo reside, type :
. ./foo
Or if foo is /tmp/foo, type :
. /tmp/foo
Hope this will help
Eric
(PBFWME;)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2005 01:07 AM
12-14-2005 01:07 AM
Re: Problem with Exporting a varaible from shell script
Hi Guys,
Thanks for your help. Now I could able to find the solution to my problem.
Thanks for your assistance.
Dinesh
Thanks for your help. Now I could able to find the solution to my problem.
Thanks for your assistance.
Dinesh
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP