Created
April 22, 2014 19:19
-
-
Save garethflowers/11191068 to your computer and use it in GitHub Desktop.
Watch Script. A drop in replacement for systems which don't have the 'watch' command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # usage: watch [command] [sleep duration] | |
| while :; do | |
| clear | |
| date | |
| bash -c "$1" | |
| sleep ${2:-1} | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment