Professional Documents
Culture Documents
10) Suppose that you are using a terminal in which the screen size is bigger than the normal 24
lines. If you want to use p and take full advantage of your terminal capabilities what choices are
open to you?
You have to specify the screen size each time you use P. $P-36.
Also you could put a shell file in your bin.
$cat/usr/you/bin/p
Exec/usr/bin/p-36$*
$
Another solution is to modify p to use an environment variable that defines the properties of your
terminal.
12) What are the special arrangements to make a terminal i/p and o/p?
When it is started by the shell, a program inherits three open files, with file descriptor 0, 1 and 2
called the standard i/p, the standard o/p, and the standard error. If the program reads “0â€
and writes descriptors 1 and 2, it can do I/O without opening files.
11) Explain about the rules used in overwrite to preserve the arguments to the users command?
Some of the rules are
• $* and $@ expand into the arguments and are rescanned; blanks in arguments will result in
multiple arguments.
• “$*†is a single word composed of all the arguments to the shell file joined together
with spaces.
• “$@†is identical to the arguments received by the shell file: blanks in arguments are
ignored and the result is a list of words identical to the original arguments.