sleep sleep | The sleep command waits. That's all it does. (GNU versions are usually loaded with features, but the sleep on the disc doesn't do more than the standard version.) So, what good is it? |
---|
A quick-and-dirty reminder service when you don't have
leave (48.5).
This will print the message Time to go now....
in 10 minutes
(600 seconds):
( ) & ; | % |
---|
You can't use at (40.3) and you have to run a job later (say, three hours):
%(sleep 10800; someprog) &
To watch a program (usually a shell script) that's running in the background and see what processes it runs:
!! | % |
---|
When you're running a series of commands that could swamp the computer, give it time to catch up. For instance, the mail (1.33) program starts background processes to deliver the mail. If you're sending a bunch of form letters, sleep five or ten seconds after each one:
foreach | % |
---|
Or, to send print jobs while you're at lunch - but give other people a chance to print between yours:
%lp bigfile1;sleep 600;lp bigfile2;sleep 600;lp bigfile3
-