Results 1 to 4 of 4

Thread: useing sleep command not working

  1. #1
    Join Date
    May 2011
    Beans
    197

    useing sleep command not working

    so i want to make a command run at startup but wait about 20 seconds before it runs, the sleep command is not working for me idk, i type
    Code:
    sleep 20`s' command
    and nothing seems to happen after 20 seconds, am i doing the command wrong?
    Fail Fail Fail SUCCESS Fail Fail Fail

  2. #2
    Join Date
    Apr 2007
    Location
    Monterey, California
    Beans
    62
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: useing sleep command not working

    the default is already seconds, and a semicolon between the time and the command works...

    Code:
    sleep 20;command
    should do the trick

  3. #3
    Join Date
    Jul 2010
    Location
    /run/shm
    Beans
    820
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: useing sleep command not working

    Using ` means you want the output of something enclosed in `` to be expanded in the place of the command. For example
    Code:
    echo Current time is `date`
    ' is the same as " as in it's used to group stuff so it won't get interpreted as separate items.
    Useful if you want to change to a directory containing a space(s)
    Code:
    cd '~/Pictures/Needs editing/May 15th/'
    In your case, you musn't add either one of those. Also as billyseth pointed out, sleep defaults to seconds.
    Quote Originally Posted by Linus Torvalds
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

  4. #4
    Join Date
    May 2011
    Beans
    197

    Re: useing sleep command not working

    oh sweet ok that totally did the trick with the simcollan , and ok thats great information guys, thanks for all the help.
    Fail Fail Fail SUCCESS Fail Fail Fail

Bookmarks

Posting Permissions

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