Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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)
"; 
    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)
";
    sleep 0.1
    done
}
Comment

PREVIOUS NEXT
Code Example
Shell :: kartik krajee daterange 
Shell :: checkout file of different commit 
Shell :: load dump command 
Shell :: staticpodpath in kuberetes 
Shell :: get everything before the last / shell 
Shell :: fix errors occurred when installing a file in linux 
Shell :: read file and while loop example 
Shell :: gentoo os-prober 
Shell :: sqlmap enumerate table content 
Shell :: how to print the number of columns in your terminal using tput in linux 
Shell :: aexprot bash varible to another script 
Shell :: E: No se pudo abrir el fichero de bloqueo «/var/cache/apt/archives/lock» 
Shell :: dpkg: dependency problems prevent configuration of zoom: 
Shell :: Another linux info 
Shell :: clam av debian not installing 
Shell :: iterm full screen cmd 
Shell :: Não é possível excluir uma partição protegida sem o parâmetro de proteção forçada definido. 
Shell :: raspberry shell get datetime now 
Shell :: display folder of path linux bashrc 
Shell :: Não foi possível encontrar o pacote conky-manager ubuntu mate 
Shell :: bash nb args 
Shell :: Turning off chrome sandbox 
Shell :: upgrade R kernel 
Shell :: change bash suggestions to be case insensitive 
Shell :: How to push the code in a perticular branch 
Shell :: bash set+x hide 
Shell :: head in windows console 
Shell :: how to enable git lol 
Shell :: install slurm ubuntu 20.04 
Shell :: install burp suite kali 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =