S5 version | Table of Contents (frame/ no frame) |
(26) More on Shells |
lpr
program. Some of these environment variables can be changed,
others are preset by the system.
env
HOME=/classes/rcomp1
SHELL=/usr/local/bin/tcsh
TERM=vt100
USER=rcomp1
PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/ucb:.
HOSTTYPE=sun4
VENDOR=sun
OSTYPE=solaris
MACHTYPE=sparc
SHLVL=1
PWD=/classes/rcomp1
LOGNAME=rcomp1
GROUP=users
HOST=sunray.dartmouth.edu
MANPATH=/usr/local/man:/usr/man:/usr/share/man
PRINTER=berry-public
Command Line Arguments
The other way information is passed to applications is through the command line arguments. Everything
following the program name on the command line, except things interpreted directly by the shell,
is made available to the program. Typically these are option flags (to modify the behaviour of the program)
and filenames (for the program to act on). The program may then also have a direct interaction
with the use via a text or graphical interface. Most program use all of the methods.
Many featuresof Unix are designed to help in automating procedures (Unix users are lazy). Passing
information via the environment and the command line is scriptable, while direct interaction via the
keyboard and mouse is not.
Job control
Shells also allow you to place jobs in the background and run multiple processes from one
shell session, although multiple windows are easier for this.
ls
-FCR > save_it &
^Z
bg
fg
jobs
slide27.src last modified Jan 31, 2011 | Introduction | Table of Contents (frame/no frame) |
Printable (single file) |
© Dartmouth College |