Skip to content

Instantly share code, notes, and snippets.

@rankun203
Last active August 5, 2016 07:42
Show Gist options
  • Save rankun203/990ad4fafe8759266f2d0f295e871363 to your computer and use it in GitHub Desktop.
Save rankun203/990ad4fafe8759266f2d0f295e871363 to your computer and use it in GitHub Desktop.
Forever run a command, e.g.: `noexit "echo Hello world." 2`
#!/bin/bash
# usage: watch.sh <your_command> <sleep_duration>
while :;
do
clear
date
$1
sleep $2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment