Operating System - HP-UX
1848046 Members
4318 Online
104022 Solutions
New Discussion

Re: Shell differences HPUX / SOLARIS

 
SOLVED
Go to solution
ESPINEL Pascal
Occasional Contributor

Shell differences HPUX / SOLARIS

HI,

What is the base shell on HP servers ( bourne, korn or Posix ) ??
We have a SUN server and i would like to have the same shell on it,so that my scripts and commands ( originaly on HP ) can work.

ex : ll or Esc - for history commands

Thank's
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Shell differences HPUX / SOLARIS

Posix would be your best bet.

Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: Shell differences HPUX / SOLARIS

Hi:

The Posix shell is the default shell for HP-UX and is found as '/sbin/sh' (staticly linked) or '/usr/bin/sh' (dynamically linked).

See 'man sh' for more information.

Regards!

...JRF...
Martin Johnson
Honored Contributor

Re: Shell differences HPUX / SOLARIS

You can use the same shell in both OSs if you are a normal user. You cannot use the same shell has root. Trying to do so will make one OS or the other unbootable.

HTH
Marty
Wodisch
Honored Contributor

Re: Shell differences HPUX / SOLARIS

Hi,

for users you can use the korn shell on both systems, but you still see some differences...
e.g. on HP-UX you complete filenames with ESC ESC, but on Solaris you'll have to type ESC \ or even ESC *

Sorry,
Wodisch
Bill Hassell
Honored Contributor
Solution

Re: Shell differences HPUX / SOLARIS

Actually, Solaris's default shell is Bourne if I remember correctly and is called /usr/bin/sh. In HP-UX, /usr/bin/sh is the POSIX shell and (AFAIK) does not exist on Solaris. The POSIX shell from HP is an almost proper superset of Korn (ksh) which is a Posix-compliant shell, just like Bash. If you want the Bourne shell in HP-UX, it's located at /usr/old/bin/sh (but use of the Bourne shell today is deprecated)

The the vast majority of scripting requirements, the POSIX shell in HP-UX is virtually identical to ksh. But since Solaris's sh is not Posix compliant, I would use /usr/bin/ksh and it will run on both. (note that like HP-UX, Solaris no longer has /bin, it is a link to /usr/bin).


Bill Hassell, sysadmin