Results 1 to 4 of 4

Thread: the sleep command

  1. #1
    Junior Member
    Join Date
    Mar 2005

    the sleep command

    in SusE linux 9.0 i discovered the sleep command and i read the info file but couldn't realy tell it's purpose, does anyone kno of how to use the sleep command?

  2. #2
    Senior Member
    Join Date
    Feb 2004
    The wait command man page simply states that it pauses script execution until a specified process ID completes. The man page for the sleep command is a single line stating that it causes a script to pause for specified period of time.
    This article explains it so you can get a grasp on it

    Here are some others from the "Cli Series" that might be of interest to you

  3. #3
    Just Another Geek
    Join Date
    Jul 2002
    Rotterdam, Netherlands
    I use it sometimes inside scripts. Sometimes I need to kill a process then restart it. If you script that, the killing might not be finished before it restarts the process. So you put a sleep between them to give the system some time to kill te process.

    killall pptp
    sleep 3
    pptp adsl &
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  4. #4
    In And Above Man Black Cluster's Avatar
    Join Date
    Feb 2005
    The sleep command is used to suspend the execution of a shell script for the specified time. This is usually in seconds.


    \"The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards - and even then I have my doubts\".....Spaf
    Everytime I learn a new thing, I discover how ignorant I am.- ... Black Cluster

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts