Here it is:
#!/bin/shIt can be used for example for printing out different statuses, for example if you are waiting for somebody to login to the Linux box, you could use ./wa w 1
while [ $1 ]
do
clear
$1
if `test $2`
then
sleep $2
else
sleep 1
fi
done
It will run a "w" command on a clean screen every second, so you don't have to constantly keep pressing w [enter] w [enter] ...
I think it's simple but convenient - the one thing Linux is missing ^^
No comments:
Post a Comment