Horje
timer in terminal ubuuntu Code Example
timer in terminal ubuuntu
countdown(){
    date1=$((`date +%s` + $1));
    while [ "$date1" -ge `date +%s` ]; do 
    ## Is this more than 24h away?
    days=$(($(($(( $date1 - $(date +%s))) * 1 ))/86400))
    echo -ne "$days day(s) and $(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r"; 
    sleep 0.1
    done
}
stopwatch(){
    date1=`date +%s`; 
    while true; do 
    days=$(( $(($(date +%s) - date1)) / 86400 ))
    echo -ne "$days day(s) and $(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r";
    sleep 0.1
    done
}




Shell

Related
git repo Code Example git repo Code Example
check and verify git version Code Example check and verify git version Code Example
How to translate a string to md5 using bash Code Example How to translate a string to md5 using bash Code Example
AppRegistryNotReady notebook django shell Code Example AppRegistryNotReady notebook django shell Code Example
how to install audacity in fedora 34 Code Example how to install audacity in fedora 34 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13