P. 1
Rehman HP

Rehman HP

|Views: 979|Likes:
Published by SuhasSmile

More info:

Published by: SuhasSmile on Jan 01, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less






The POSIX shell is the default shell for HP-UX users. Other shells are also available on HP-
UX. Important shells and their corresponding executable files are listed in Table 9-1.

Table 9-1. Important UNIX Shells

Name of Shell

Path to Shell File

POSIX shell


Bourne shell


Korn shell


C shell


There are two other shells used in HP-UX. One of these is called the restricted shell
(/usr/bin/rsh), which is used to provide restricted access to some users. The key shell
(/usr/bin/keysh) is a context-sensitive shell that may be handy to use with HP terminals.
The capabilities of POSIX and other important shells available on HP-UX systems are
presented in Table 9-2.

HP Certified: HP-UX System Administration, 1/e

Page 107 of

Table 9-2. Features of Different UNIX Shells



POSIX Bourne Korn C


Allows previous commands to be viewed and

Yes No

Yes Yes

Line editing Allows a command line to be edited

Yes No

Yes No

File name

Enables the user to enter partial file names and
complete these automatically by pressing certain

Yes No

Yes Yes


Allows creating aliases for standard commands Yes No

Yes Yes

Job control Allows for running jobs in background and moving
jobs from background to foreground and vice

Yes No

Yes Yes

In the rest of this chapter, you will learn more about some of the capabilities of the POSIX

Shell and Subshell

A subshell can be invoked inside a shell at any time by using the shell path as the command
line. A subshell inherits all environment variables from the parent shell but doesn't inherit any
shell variables. Sometimes a user may need to invoke a subshell to have a particular shell
environment. The current shell also invokes subshells if required by a command. Shell scripts
are usually executed in subshells. You can exit from a subshell using the exit command at any

Controlling Resources (ulimit)

The ulimit command is an intrinsic command of the POSIX shell and is used to limit user
resources. If you specify the -a switch with this command, it lists current resource limits. A
typical output of the command is as follows.
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 135168
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 256
This command is very useful if you want to specify a limit for resources. For example, if you
don't want the shell to create a core file larger than 1024 blocks, you can use following
$ ulimit -c 1024
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited

HP Certified: HP-UX System Administration, 1/e

Page 108 of

data(kbytes) 135168
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 1024
nofiles(descriptors) 256

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->