- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ksh minor annoyance - 'literal' PS1?
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
тАО04-14-2008 03:34 AM
тАО04-14-2008 03:34 AM
ksh minor annoyance - 'literal' PS1?
This is a relatively minor problem but I haven't been able to get a fix and it has become a matter of principle(!).
In short, when I su to some of my accounts, instead of having a correctly set PS1, I get the literal values e.g.:
${USER}@${HOST}[${ORACLE_SID}] $PWD >
Logging in directly to the accounts shows the expected prompt. These are all ksh accounts, each with a .profile which exports ENV=$HOME/.kshrc
.kshrc is responsible for exporting PS1. Both profile and kshrc are executable. What am I missing?
Thanks in advance...
cam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 03:48 AM
тАО04-14-2008 03:48 AM
Re: ksh minor annoyance - 'literal' PS1?
Do you do "su -"? If you don't, you shouldn't expect any prompt changes.
Or it appears that PS1 may not have been quoted correctly?
In any case, why make a large prompt. I only have "$ " and I put the path in the window banner.
>.kshrc is responsible for exporting PS1.
PS1 should be in .profile and all of your aliases/functions that you don't want for your scripts should be in .kshrc. Of course you need the complex pattern for ENV.
>Both .profile and .kshrc are executable.
These don't need to be executable since they are sourced.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 03:54 AM
тАО04-14-2008 03:54 AM
Re: ksh minor annoyance - 'literal' PS1?
how can you change the window banner?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 03:57 AM
тАО04-14-2008 03:57 AM
Re: ksh minor annoyance - 'literal' PS1?
I have escape sequences for xterm/dtterm and hpterm. I have a bunch of functions for cd, pushd/popd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 03:58 AM
тАО04-14-2008 03:58 AM
Re: ksh minor annoyance - 'literal' PS1?
Not sure why quoting in PS1 would fail in su but succeed for a 'direct' login?
Points noted about kshrc and profile execute bit. As for length of prompt.. each to their own, I suppose. I work with many accounts across multiple machines and Oracle instances. This is the way I like to set things up.
As for PS1 should be in profile - assume this is a recommendation and not something that should technically make any difference.
Thanks for the response,
cam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 04:01 AM
тАО04-14-2008 04:01 AM
Re: ksh minor annoyance - 'literal' PS1?
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1208171763348+28353475&threadId=433333
describing changing the xterm title (assume this is what you mean).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 06:21 AM
тАО04-14-2008 06:21 AM
Re: ksh minor annoyance - 'literal' PS1?
Cheers,
cam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 03:20 PM
тАО04-14-2008 03:20 PM
Re: ksh minor annoyance - 'literal' PS1?
Can you echo the value of PS1?
The only way I can get your unexpanded string is with:
\${USER}@\${HOST}[\${ORACLE_SID}] \$PWD