LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   command line counter tool to replace "sleep" (https://www.linuxquestions.org/questions/linux-software-2/command-line-counter-tool-to-replace-sleep-609028/)

kutlu 12-25-2007 07:09 AM

command line counter tool to replace "sleep"
 
I am looking for a command line tool which will replace sleep command, I want it to show the countdown in command line. I am curious about how much time is left.

Slick666 12-25-2007 09:48 AM

Why don't you write a shell script to do the job
Code:

for[[i=100; i>0; i--]]
do
    echo $i
    sleep 1
done

Something like that would do what you wanted and you could customize it to have the exact output you want.

bigrigdriver 12-25-2007 03:27 PM

#!/bin/bash

for ((i=100;i>0;i--));
do
echo $i
sleep 1
done

kutlu 12-25-2007 10:42 PM

Thanks, I'll do it.


All times are GMT -5. The time now is 08:51 PM.