Quantcast
Channel: SE Stuff and the like... » second
Viewing all articles
Browse latest Browse all 2

wait in Bash..

$
0
0

This is an alternative for sleep [i]n[/i]

function wait(){
    BOGUS=`read -n1 -t1 any_key`
    BOGUS=''
}

If you have sleep available, you rather use sleep then this method! i.e.

$N=1;
while :
do
    echo "$N"
    sleep 1
    let N=$N+1;
done

Tagged: #!/usr/bin/bash, bash, for, function, howto, Linux, one, pause, programming, Scripting, second, shell, tip, trick, Using, wait

Viewing all articles
Browse latest Browse all 2

Trending Articles