- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Which 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
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
тАО10-25-2006 04:02 AM
тАО10-25-2006 04:02 AM
Has anyone of you ever got frustrated with all those different Unix shells? Well, perhaps I got spoiled too much by VMS DCL ;-) Anyway, I would imagine and hope there is someone out there who could please help me to understand a few things:
Tru64, 5.1B:
1) /sbin/sh
2) /bin/sh -> usr/bin/sh
3) /usr/bin/posix/sh
What's the difference between 1 and 2? Dynamic Library? Both shells do not allow to create alias, hence not POSIX, I guess, but also don't produce errors regarding it.
I figured that the variable BIN_SH controls the "behavior" of sh. You get the POSIX compliant shell with "xpg4", the SVR4-like shell "svr4" or the Bourne shell with BIN_SH unset. I exported BIN_SH to "xpg4" in .profile to make it a POSIX sh and the alias command works as expected. I suppose I can just forget about /usr/bin/posix/sh?
Very interesting:
http://www.in-ulm.de/~mascheck/various/shells/
Any chance to get file completion and up-arrow key history working in POSIX or SVRwhatever SH?
Can I enable that in KSH, and how please?
I decided I don't even want to bother about c-shell and get into .login .chrc, bourn or korn, which both use .profile at least, are complicated enough. Anyone share this opinion?
Can I switch to KSH safely without compromising the system. I noticed that the way to export or source variables is different, and actually gives different results. It's probably not a good idea to start out with ksh, set a certain environment and run sh scripts, even with #/bin/sh inside scripts.
I appreciate you comments!
Best regards,
Markus
P.S. Someone at HP please make sure VMS won't die. I suppose the Tru64 case is lost.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 04:06 AM
тАО10-25-2006 04:06 AM
Solution1) /sbin/sh is statically linked. This is so you can work in single user mode without libraries available. Those libraries are usually in /usr/lib which isn't mounted in single user mode. In HP-UX root MUST have this as its default shell. Not sure about Tru64.
2) /usr/bin/sh is the shell that is generally used by users. It dynamically calls libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 04:09 AM
тАО10-25-2006 04:09 AM
Re: Which Shell
2=dynamic
personally, I always use ksh. do not change root's shell. try esc-k for cmd history.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 04:52 AM
тАО10-25-2006 04:52 AM
Re: Which Shell
Arrow keys are tricky to implement because there are so many different terminals (well, today, emulators) out there and these keys are not single ASCII characters. Bash can implenment arrow keys but you'll have to download a copy for HP-UX.
As far as standard shell features, POSIX is the most universal standard for Unix shells although there are a lot to choose from (pdksh bash ksh-88 ksh-93, etc) and non-ASCII character control keys will always be 'iffy' on various versions.
NOTE: On HP-UX (and Solaris and other SysV v.4 version filesystems) there is no /bin or /lib so you'll need to learn the 'new' locations: /usr/bin and /usr/lib. In HP-UX (and Solaris too) /bin is not a directory at all but is instead a temporary transition link (a symbolic) link. (try: ls -ld /bin /usr) The man page for tlinstall explains this. These 'new' locations are not new at all - they are more than a decade old.
ksh is by far the most universal shell so for multi-system management, I would use that shell. For command line recall and editing, make sure that these lines are in your /etc/profile or .profile:
export HISTFILE=$HOME/.sh_history
export HISTSIZE=1000
export EDITOR=/usr/bin/vi
These variables are universal so you'll find them useful on most flavors of Unix. The fc shell built=in can manage your command history but most admins will alias these:
alias history='fc -l'
alias r='fc -e -'
alias h='fc -l' is a nice shortcut to typing history. history 200 shows the last 200 commands. r recalls the current or r 194 recalls the 194th command in the history list. vi editing commands can be used to change the recalled line and Enter will execute the result. This type of command line recall/edit works in the POSIX shell, ksh, and dtksh.
All these differences is what makes multi-system Unix fun to learn. ;-)
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 05:03 AM
тАО10-25-2006 05:03 AM
Re: Which Shell
http://www.gnu.org/software/bash/
Command-line recall is fairly VMS-like. As
with much GNU stuff, it has more features
than any sane person would want, so it
probably has what you want, too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 06:21 AM
тАО10-25-2006 06:21 AM
Re: Which Shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 08:20 AM
тАО10-25-2006 08:20 AM
Re: Which Shell
Seems like Bash is doing most of what I need to make my life easier without having to configure much or know cryptic VT keystrokes. But what worries is that Bash has too many features. I mean, how much can I trust Bash as a command shell under Tru64 in a production environment regarding security and compatibiltiy. I can imagine it was a long way to Bash version 6.12 - if I may say that please without undermining anyones work or ideas.
Assuming that actually most people appreciate the same few file navigation and prompt features, I'm surpised there are not included in the bourne shell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 09:14 AM
тАО10-25-2006 09:14 AM
Re: Which Shell
Bourne will never be enhanced - it is a standard (very old standard) shell and if it was enhanced, it would no longer be compatible. There are so many severe limitations in the Bourne shell that most sysadmins won't use it. So the question about which shell is best depends a lot on whether you will be working on a lot of different systems.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 07:36 PM
тАО10-25-2006 07:36 PM
Re: Which Shell
1. for static
2. for dynamic
Yes you can change your shell to ksh without any problem if you already not running some important scripts in previous shell, i hope only changing in /etc/passwd should work.
I prefer bash it is really good and helpful while working.
All depends upon the customized applications or the requirement that you have.
Br
Manish Pathak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2006 10:55 PM
тАО10-25-2006 10:55 PM
Re: Which Shell
My conclusion now is that although Ksh(93) is probably cool for scripting and using available resources efficiently, bash is more compatible with sh, providing what I need, and suitable for my environment. Bash is also standard on most Linux systems, which should hopefully not introduce, but offer sufficient support in terms of detecting security flaws, etc. quickly. If we had public access to our systems I would use /usr/bin/sh as standard, and ksh for advanced users, but that is not the case here.