![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linux Shell Question: how to print the shell script name ? | meili100 | UNIX for Dummies Questions & Answers | 3 | 07-01-2008 10:55 AM |
| Difference between writing Unix Shell script and AIX Shell Scripts | haroonec | AIX | 0 | 04-11-2006 11:27 PM |
| How to run unix commands in a new shell inside a shell script? | hkapil | Shell Programming and Scripting | 2 | 01-04-2006 03:56 AM |
| how to convert from korn shell to normal shell with this code? | forevercalz | Shell Programming and Scripting | 21 | 11-22-2005 11:18 PM |
| simple shell - how to get a parameter typed in a shell script | cmitulescu | Shell Programming and Scripting | 3 | 12-05-2001 12:04 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
HP-UX B.11.11 U 9000/800 (tb)
in /etc/passwd : SHELL=/sbin/sh in man sh : Code:
_________________________________________ | To obtain: | Use the command: | |_______________|_______________________| | POSIX Shell | /usr/bin/sh ... | | Korn Shell | /usr/bin/ksh ... | | C Shell | /usr/bin/csh ... | | Key Shell | /usr/bin/keysh | | Bourne Shell | /usr/old/bin/sh ... | |_______________|_______________________| i like to know which shell i am using?... ie /sbin/sh is posix shell or bourne shell?.. Last edited by Perderabo; 10-23-2005 at 01:04 PM. Reason: Add code tags and clean up table for readability |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
/sbin/sh is a statically linked version of the bourne shell. It is the correct shell for the root user, for several reasons, not least of which is that if you accidentally delete something the dynamically linked shells depends on your root shell still works and you stand a reasonably good chance of being able to fix it. It is also used during boot, before /usr is mounted and as such it is the only working shell at that point.
Some people do change the root login shell, personally I think that doing so is at best foolish. It takes less than a second to type the command for a preferred shell such as ksh tcsh or bash. Last edited by reborg; 10-23-2005 at 02:51 PM. Reason: spelling |
|
#3
|
||||
|
||||
|
Quote:
Code:
$ uname -srm HP-UX B.11.11 9000/800 $ file /usr/bin/sh /sbin/sh /usr/bin/sh: PA-RISC1.1 shared executable dynamically linked /sbin/sh: PA-RISC1.1 shared executable $ exec /sbin/sh $ [[ +123 = ?(+|-)+([0-9]) ]] && echo +123 is an integer +123 is an integer $ |
|
#4
|
||||
|
||||
|
Oops my bad, I missed the very first line and am so used to dealing with Solaris that I responded on autopilot.
|
||||
| Google The UNIX and Linux Forums |