Skip to content

Instantly share code, notes, and snippets.

@garethflowers
Created April 22, 2014 19:19
Show Gist options
  • Select an option

  • Save garethflowers/11191068 to your computer and use it in GitHub Desktop.

Select an option

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.
#!/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