- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- preserve env when run ksh
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
Forums
Discussions
Discussions
Discussions
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
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-04-2004 08:00 PM
05-04-2004 08:00 PM
preserve env when run ksh
Can I run ksh or sh (spwan a shell) but inherit the parent's env setting (.profile) ??
Not sure if this is posted before, if yes please direct me to the relevant posting.
Thank u.
Lai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 08:06 PM
05-04-2004 08:06 PM
Re: preserve env when run ksh
Sub shell normaly get their ancestor environnement.
Can you be more specific ...
Cheers
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 08:09 PM
05-04-2004 08:09 PM
Re: preserve env when run ksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 08:09 PM
05-04-2004 08:09 PM
Re: preserve env when run ksh
Sorry, you are right. comparing the env before and after I do a ksh, the env are the same. But somehow PS1 setting seems to be lost.
Is there a way to preserver PS1 setting then ?
Thanks
Lai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 08:12 PM
05-04-2004 08:12 PM
Re: preserve env when run ksh
THanks.. I think I got it.
Lai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 08:13 PM
05-04-2004 08:13 PM
Re: preserve env when run ksh
For local varibale like say we have VAR1 then:
#
# VAR1=green
# echo $VAR1
green
# ksh
# echo $VAR1 (** nothing is displayed below)
# exit
# export VAR1=green
# ksh
# echo $VAR1
green
#
# exit
# echo $VAR1
green
#
I hope this makes it clear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 11:48 PM
05-04-2004 11:48 PM
Re: preserve env when run ksh
From your .profile file or inside of your current environment invokes the execution of the new deppending environment throught the following sintax:
. ./new_script
^
This first dot is the key!
Where new_script is the file that contains the dependences of variables defined in the file .profile.
Rgds,