Name
batch
Synopsis
batch [options
] [time
]
Execute commands entered on standard input. End with EOF. Unlike at, which executes commands at a specific time, batch executes commands one after another (waiting for each one to complete). This avoids the potentially high system load caused by running several background jobs at once. The GNU/Linux and Mac OS X versions allow you to specify time, which is when the job should run. See also at.
On Solaris, batch is
equivalent to at -q b -m now
.
It takes no arguments, reading commands from standard input.
Instead of the original System V version, Mac OS X uses an earlier
version of the same batch
command found on GNU/Linux. The GNU/Linux version has more
options.
Tip
On Mac OS X, at, atq, atrm and batch are disabled by default. See the at(1) manpage for more information.
Solaris Option
-
-p
project
Run the job under project project.
GNU/Linux and Mac OS X Options
-
-f
file
Read the job commands from file instead of from standard input.
-
-m
Send mail to the user when the job is done.
GNU/Linux Options
-
-q
queue
Use job queue queue. See the entry for at for more information.
-
-v
Show the time when the job will run.
-
-V
Print version information to standard error before reading the job.
Example
$batch
sort data.raw > data.sorted
troff -Tps -mm thesis.mm > bigfile.ps
EOF
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.