- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to override bounce shell with korn shell
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
02-01-2007 04:27 AM
02-01-2007 04:27 AM
I did the export SHELL=/bin/ksh in .profile and the echo $SHELL also gives me /bin/ksh but the passwd file has /bin/sh for this user and commands like alias and $PWD do not work for me . How to override the SHELL so that all these commands work through my .profile.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 04:34 AM
02-01-2007 04:34 AM
Re: How to override bounce shell with korn shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 04:38 AM
02-01-2007 04:38 AM
Re: How to override bounce shell with korn shell
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 04:43 AM
02-01-2007 04:43 AM
Re: How to override bounce shell with korn shell
Get the sysadmin to change you in /etc/passwd ??
In scripts:
#!/usr/bin/ksh
/bin/sh in HP-UX is the posix shell. It is almost identical to the korn shell.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 04:44 AM
02-01-2007 04:44 AM
Re: How to override bounce shell with korn shell
if [ "$SHELL" = "/bin/sh ]
then
SHELL=/usr/bin/ksh
exec ~/myprofile
fi
and in myprofile
#!/usr/bin/ksh
. ~/.profile
exec /usr/bin/ksh
it should work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 04:55 AM
02-01-2007 04:55 AM
Re: How to override bounce shell with korn shell
Regards,
B.MariappaN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 04:59 AM
02-01-2007 04:59 AM
Re: How to override bounce shell with korn shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 04:59 AM
02-01-2007 04:59 AM
Re: How to override bounce shell with korn shell
Anything you are used to using in ksh should work in the POSIX shell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 05:03 AM
02-01-2007 05:03 AM
Re: How to override bounce shell with korn shell
its gives me the following error when running .profile :
syntax error: `end of file' unexpected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 05:59 AM
02-01-2007 05:59 AM
SolutionThe first line is missing a quote:
if [ "$SHELL" = "/bin/sh" ]
Notice that this approach doesn't actually change the shell. Rather, it runs ksh as a sub-shell of sh.
The best solution is to change the user's shell in /etc/passwd via 'vipw' or 'chsh
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 08:48 AM
02-01-2007 08:48 AM