Linux: repeatedly run a command to monitor output

If you need to repeatedly run a command and view the output changes over time then check out my script. I was watching a RAID array rebuild slowly and needed a way to see the progress over time.

Usage: [--delay 15] [--line 3] command

Run my_command every 15 seconds: --delay 15 'my_command | grep stuff'

Filter output to only line 2: --line 2 'ping -c 1'

Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
Logged IP:
To prevent spam please submit by clicking the kitten: