Results 1 to 3 of 3

Thread: How to have a countdown between commands in a bash script.

  1. #1
    Join Date
    Jul 2012
    Beans
    123

    How to have a countdown between commands in a bash script.

    I want to make a script that'll seem the computer is talking to you, right? But It'll go way to fast as the script'll run it all very fast, is there anyway to have a command that delays between two? Like this....

    Code:
    echo Hello
    [Command to delay a couple of seconds]
    echo blah blah, so on and so forth..

  2. #2
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,393
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to have a countdown between commands in a bash script.

    sleep n where n is number of seconds
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  3. #3
    Join Date
    Jul 2012
    Beans
    123

    Re: How to have a countdown between commands in a bash script.

    Quote Originally Posted by Vaphell View Post
    sleep n where n is number of seconds
    Thanks! Didn't know it was that simple! I will try it when I get to my Ubuntu computer at home and tell you if it works......

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
  •