- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Change in environment variable
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
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
тАО06-11-2009 07:00 PM
тАО06-11-2009 07:00 PM
I am using HP-UX 11.23. My path environment variable having these values...
PATH=/oracle/PRD/920_64/bin:.:/home/prdadm:/usr/sap/PRD/SYS/exe/runU:/usr/sap/PRD/SYS/exe/run:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/hparray/bin:/opt/nettladm/bin/opt/fcms/bin:/usr/contrib/kwdb/bin:/usr/bin/X11:/opt/graphics/common/bin:/opt/upgrade/bin:/usr/contib/bin/X11:/opt/ipf/bin:/opt/resmon/bin:/opt/ignite/bin:/opt/sec_mgmt/bastille/bin:/opt/gnome/bin:/ot/mozilla:/opt/wbem/bin:/opt/wbem/sbin:/opt/mx/bin:/opt/sec_mgmt/spc/bin
Now, i want to remove the path /usr/sap/PRD/SYS/exe/runU: from this variable.
Plz tell me the procedure. This is path of prdadm user but in the home directory ie /home/prdadm i didn't found the .* files.
Ankit
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 07:16 PM
тАО06-11-2009 07:16 PM
Re: Change in environment variable
Check on one of the location:
1) User's .profile
$grep runU $HOME/.profile
2) under /etc/profile
grep runU /etc/profile
3)
grep runU /etc/PATH
Let me know your findings.
Cheers!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 07:25 PM
тАО06-11-2009 07:25 PM
Re: Change in environment variable
But i didn't find any output after these searches as my output is ......
prdadm 22> grep runU $HOME/.profile
prdadm 23> grep runU /etc/profile
prdadm 24> grep runU /etc/PATH
prdadm 25> $PATH
/oracle/PRD/920_64/bin:.:/home/prdadm:/usr/sap/PRD/SYS/exe/runU:/usr/sap/PRD/SYS/exe/run:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/contrib/kwdb/bin:/usr/bin/X11:/opt/graphics/common/bin:/opt/upgrade/bin:/usr/contrib/bin/X11:/opt/ipf/bin:/opt/resmon/bin:/opt/ignite/bin:/opt/sec_mgmt/bastille/bin:/opt/gnome/bin:/opt/mozilla:/opt/wbem/bin:/opt/wbem/sbin:/opt/mx/bin:/opt/sec_mgmt/spc/bin: Command not found.
Ankit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 07:27 PM
тАО06-11-2009 07:27 PM
Re: Change in environment variable
To do what? Remove it now? Make sure that
it never gets put in?
Something like this may get it out:
xxx='/usr/sap/PRD/SYS/exe/runU'
export PATH=` echo ":${PATH}:" | sed -e "s|:${xxx}:|:|" -e 's/^://' -e s'/:$//' `
> [...] i didn't found the .* files.
"man your_shell" to see the other places it
might look. "/etc/profile", perhaps?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 09:01 PM
тАО06-11-2009 09:01 PM
Re: Change in environment variable
>>>> prdadm 22> grep runU $HOME/.profile
Your statements contradicting.
prdadm 22> grep runU $HOME/.profile
if you don't have $HOME/.profile , error message should be "grep: can't open .profile"
Check your .profile it should have some program/script which would be setting the PATH.
Cheers!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 09:56 PM
тАО06-11-2009 09:56 PM
Re: Change in environment variable
You were right. .* files are exist in $HOME directory. i was seaching by ll command. when i used ll .* command. It shows me some files like .*.
Now my problem is that /usr/sap/PRD/SYS/exe/runU path is showing befor /usr/sap/PRD/SYS/exe/run in PATH environment variable. But when i am checking in script, /usr/sap/PRD/SYS/exe/run is everywhere before /usr/sap/PRD/SYS/exe/runU. Like in script .sapenv_MSLDR.sh ....
MSLDR:prdadm 45> grep runU $HOME/.sapenv_MSLDR.sh
for d in /usr/sap/PRD/SYS/exe/run /usr/sap/PRD/SYS/exe/runU $HOME .; do
LIBPATH=/usr/lib:/lib:/usr/sap/PRD/SYS/exe/run:/usr/sap/PRD/SYS/exe/runU; export LIBPATH
for d in /usr/sap/PRD/SYS/exe/run /usr/sap/PRD/SYS/exe/runU; do
SHLIB_PATH=/usr/sap/PRD/SYS/exe/run:/usr/sap/PRD/SYS/exe/runU; export SHLIB_PATH
for d in /usr/sap/PRD/SYS/exe/run /usr/sap/PRD/SYS/exe/runU; do
LIBPATH=/usr/lib:/lib:/usr/lpp/icli/sbin:/usr/sap/PRD/SYS/exe/run:/usr/sap/PRD/SYS/exe/r
nU; export LIBPATH
for d in /usr/lpp/icli/sbin /usr/sap/PRD/SYS/exe/run /usr/sap/PRD/SYS/exe/runU; do
LD_LIBRARY_PATH=/usr/sap/PRD/SYS/exe/run:/usr/sap/PRD/SYS/exe/runU; export LD_LIBRARY_PA
H
for d in /usr/sap/PRD/SYS/exe/run /usr/sap/PRD/SYS/exe/runU; do
Now, i want that in PATH variable /usr/sap/PRD/SYS/exe/run should be before /usr/sap/PRD/SYS/exe/runU. plz suggest what i should do.
Ankit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 10:14 PM
тАО06-11-2009 10:14 PM
SolutionSimple answer : Don't use the script anymore "$HOME/.sapenv_MSLDR.sh"
Comment this line in your $HOME/.profile
set your PATH variables:
export LIBPATH=/usr/sap/PRD/SYS/exe/run:/usr/sap/PRD/SYS/exe/runU:.
and whatever path you want to add , just add it
As nike says : Just Do it!!
Comprender?
Cheers!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2009 03:02 AM
тАО06-12-2009 03:02 AM
Re: Change in environment variable
But i want to change the PATH variable not the addition to the variable as currenly it is ...
PATH=/oracle/PRD/920_64/bin:.:/home/prdadm:/usr/sap/PRD/SYS/exe/runU:/usr/sap/
PRD/SYS/exe/run:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:
/opt/hparray/bin:/opt/nettladm/bin/opt/fcms/bin:/usr/contrib/kwdb/bin:/usr/bin/X11:/opt/
graphics/common/bin:/opt/upgrade/bin:/usr/contib/bin/X11:/opt/ipf/bin:/opt/resmon/bin
:/opt/ignite/bin:/opt/sec_mgmt/bastille/bin:/opt/gnome/bin:/ot/mozilla:/opt/wbem/bin:/o
pt/wbem/sbin:/opt/mx/bin:/opt/sec_mgmt/spc/bin
i want it like ..
PATH=/oracle/PRD/920_64/bin:.:/home/prdadm:/usr/sap/
PRD/SYS/exe/run:/usr/sap/PRD/SYS/exe/runU:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:
/opt/hparray/bin:/opt/nettladm/bin/opt/fcms/bin:/usr/contrib/kwdb/bin:/usr/bin/X11:/opt/
graphics/common/bin:/opt/upgrade/bin:/usr/contib/bin/X11:/opt/ipf/bin:/opt/resmon/bin
:/opt/ignite/bin:/opt/sec_mgmt/bastille/bin:/opt/gnome/bin:/ot/mozilla:/opt/wbem/bin:/o
pt/wbem/sbin:/opt/mx/bin:/opt/sec_mgmt/spc/bin
or this .
PATH=/oracle/PRD/920_64/bin:.:/home/prdadm:/usr/sap/
PRD/SYS/exe/run:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:
/opt/hparray/bin:/opt/nettladm/bin/opt/fcms/bin:/usr/contrib/kwdb/bin:/usr/bin/X11:/opt/
graphics/common/bin:/opt/upgrade/bin:/usr/contib/bin/X11:/opt/ipf/bin:/opt/resmon/bin
:/opt/ignite/bin:/opt/sec_mgmt/bastille/bin:/opt/gnome/bin:/ot/mozilla:/opt/wbem/bin:/o
pt/wbem/sbin:/opt/mx/bin:/opt/sec_mgmt/spc/bin
Also plz note that it is for user prdadm not for root.
Ankit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2009 06:39 AM
тАО06-12-2009 06:39 AM
Re: Change in environment variable
1) "grep" is probably the wrong tool for this job, as it will only tell you if the file it looked at, not any scripts or files it might run/reference which could change the settings
2) all of the previous posts are based on the use of sh / ksh style shell. Given your talking Oracle & SAP, and:
prdadm 22> grep ......
prdadm 23> grep ......
prdadm 24> grep ......
prdadm 25> $PATH
I'd bet money "prdadm" is running "csh". If so, it uses a different set of startup files. From csh man page:
"~/.cshrc
A csh script sourced (executed) at the beginning of execution by each shell. See WARNINGS
~/.login
A csh script sourced (executed) by login shell, after .cshrc at login.
/etc/csh.login
A csh script sourced (executed) before ~/.cshrc and ~/.login when starting a csh login (analogous to /etc/profile in the Bourne shell)."
In any event, check the password file entry for the user in question to find out for certain which shell is in use, and consult the "man" page for that shell. The "FILES" section should point you at the files that shell uses to set it's login environment.
3) After determining which shell / startup files apply, view them to see if they setenv PATH, or what other files / scripts they may reference. You will need to review any referenced scripts as well to determine what they do as well.
Once you locate the scripts that muck about with PATH (and there could be more than one), post your findings....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2009 10:15 AM
тАО06-12-2009 10:15 AM
Re: Change in environment variable
Bill Hassell, sysadmin