[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] scripting, bash, help



Ed June wrote:
> 
> How do I make the following loop continously?
> tail -n 1 /var/log/secure | grep -v ident && echo -e "\a"
> Gno, tail -f -n 1 doesn't do it, it doesn't beep then...

while :
do
    tail -n 1 /var/log/secure | grep -v ident && echo -e "\a"
    sleep 60 #(seconds) or whatever sleep time you want.
done

The sleep isn't necessary, but it is recommended if you don't
want a machine at 1+ load average.