Next / Previous / Index / ITC Help System / Publications / Site map / NM Tech homepage

Running processes in sequence

Tech Computer Center logo

Normally, if you type a command at the Unix prompt, that command runs to completion, and then when it is finished, you get another Unix prompt.

To execute multiple commands in sequence, place the commands on the same line, separated by semicolon (";") characters:

    % insult_waiter;wake_up_neighbor;wreck_car
Unix will execute the insult_waiter command first. When that is done, the wake_up_neighbor command will be run. When that finishes, the wreck_car process will be run, and then you will get another command prompt.

Note that you can redirect the input and output for a whole sequence of processes at once by grouping the commands in parentheses. For example, the command

    % (insult_waiter;wake_up_neighbor;wreck_car) >twit.out
would cause the standard output for all three processes to be redirected to file twit.out.
Next: What is a background process?
See also: Controlling multiple processes
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Information Technology and Communications: Help System
ITC Publications
To report a problem: File a ticket
Send mail to the User consultant on duty or call them at 575-835-5437
Home: About New Mexico Tech

John Shipman,
Last updated: 1995/12/04 19:39:34 UT
QR two-dimensional bar code