Thursday, December 3, 2009

Infinite loop in bash

I needed an infinite loop for polling a database table for a while (killed with Ctrl-C).


while [ 1 ];
do mysql -u paul -h test_database -ppass test_paul data_table <<< "show processlist";
sleep 10;
done

No comments:

Post a Comment