- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Display dinamically the ORACLE_SID variable value ...
Operating System - HP-UX
1819874
Members
2662
Online
109607
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
Discussions
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
тАО04-28-2011 11:29 PM
тАО04-28-2011 11:29 PM
I'm triyng to dysplay the $ORACLE_SID value on the prompt.
After setting the ORACLE_SID by command line I wolud like to see it in the prompt.
I tried to change it in the PS1 variable in .profile file but my attempt was unsuccessfully:
PS1="$(echo $ORACLE_SID):\$PWD>
Example:
ORADB1:\> export ORACLE_SID=ORADB2
ORADB2:\>
Have you got any suggest?
Regards,
BG
After setting the ORACLE_SID by command line I wolud like to see it in the prompt.
I tried to change it in the PS1 variable in .profile file but my attempt was unsuccessfully:
PS1="$(echo $ORACLE_SID):\$PWD>
Example:
ORADB1:\> export ORACLE_SID=ORADB2
ORADB2:\>
Have you got any suggest?
Regards,
BG
Solved! Go to Solution.
- Tags:
- PS1
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2011 11:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2011 07:21 AM
тАО06-06-2011 07:21 AM
Re: Display dinamically the ORACLE_SID variable value in PS1
Try this in ksh or sh-posix:
export PS1='${ORACLE_SID:-NoSID},${LOGNAME}[${PWD##*/}]$ '
It should include SID,User, and short PWD in your prompt. Also, if SID is ever unset/null then your prompt will tell you.
export PS1='${ORACLE_SID:-NoSID},${LOGNAME}[${PWD##*/}]$ '
It should include SID,User, and short PWD in your prompt. Also, if SID is ever unset/null then your prompt will tell you.
Old School efficiency. New World Tools.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2011 09:05 AM
тАО06-06-2011 09:05 AM
Re: Display dinamically the ORACLE_SID variable value in PS1
Solved.
Thanks for the great support.
Regards,
BG
Thanks for the great support.
Regards,
BG
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP