HP-UX Reference (11i v3 07/02) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
introduction(9) introduction(9)
be left in a file named
a.out in the current directory. Since the results of a subsequent compilation may
also be placed in
a.out, thus overwriting the current output, you may want to use
mv to give the output a
unique name. If the program is written in assembly language, you will probably need to link library sub-
routines with it (see ld(1)). FORTRAN, C, and aC++ call the linker automatically.
When you have gone through this entire process without encountering any diagnostics, the resulting pro-
gram can be run by giving its name to the shell in response to the prompt.
Your programs can receive arguments from the command line just as system programs do by using the argc
and argv parameters. For more information, see your language’s Programmer’s Guide.
Text Processing
Almost all text is entered through a text editor. The editor preferred above all others provided with HP-UX
is the
vi editor. For batch-processing text files, the
sed editor is very efficient. The ex editor is useful for
handling certain situations while using
vi but most other editors are rarely used except in various scripts.
The following editors are the same program masquerading under various names:
vi, view, and vedit
(see vi(1)) and ex and edit
(see ex(1)). For information about the sed stream editor, see sed(1). The ed
line editor is described in ed(1).
The commands most often used to display text on a terminal are
cat, more, and
pr. See cat(1), more(1),
and pr(1). The
cat command simply copies ASCII text to the terminal, with no processing at all. The
more command displays text on the terminal a screenful at a time, pausing for an acknowledgement from
the user before continuing. The pr command paginates text, supplies headings, and has a facility for mul-
ticolumn output. pr is most commonly used in conjunction with the lp command (see lp(1)) to pipe for-
matted text to a line printer.
Interuser Communication
Certain commands provide interuser communication. Even if you do not plan to use them, it could be
beneficial to learn about them, because someone else may direct them toward you. To communicate with
another user that is currently logged in, you can use
write to transfer text directly to that user’s terminal
display (if permission to do so has been granted by the other user). Otherwise, elm, mailx
,ormail (in
order of ease of use) can send a message to another user’s mailbox. The user is then informed by HP-UX
that mail has arrived (if currently logged in) or mail is present (when the user next logs in). Refer to
elm(1), mail(1), mailx(1), and write(1) for explanations of how these commands are used.
ACKNOWLEDGEMENTS
UNIX is a registered trademark of The Open Group.
SEE ALSO
cat(1), cc_bundled(1), cd(1), chsh(1), cp(1), csh(1), ed(1), ex(1), ksh(1), ld(1), login(1), lp(1), ls(1), mail(1),
mailx(1), man(1), mkdir(1), more(1), mv(1), passwd(1), pr(1), rm(1), rmdir(1), sed(1), sh(1), sh-posix(1),
stty(1), tabs(1), vi(1), write(1), a.out(4), profile(4), glossary(9).
The HP Technical Documentation website at:
http://docs.hp.com.
278 Hewlett-Packard Company − 7 − HP-UX 11i Version 3: February 2007