diff options
author | Manuel Munz <freifunk@somakoma.de> | 2012-05-30 18:26:09 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2012-05-30 18:26:09 +0000 |
commit | e0797183feb485dcc0070f69a654c10b457cb61b (patch) | |
tree | 54693cb63a8d8478874ab857007230a76719bb93 /contrib/package | |
parent | 5c4a6b5e7d6f31eb2038d6e144126e5938e5655a (diff) |
contrib/freifunk-common: add watch.sh script to simulate the watch command
Diffstat (limited to 'contrib/package')
-rwxr-xr-x | contrib/package/freifunk-common/files/usr/bin/watch.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/package/freifunk-common/files/usr/bin/watch.sh b/contrib/package/freifunk-common/files/usr/bin/watch.sh new file mode 100755 index 0000000000..728526b9e1 --- /dev/null +++ b/contrib/package/freifunk-common/files/usr/bin/watch.sh @@ -0,0 +1,11 @@ +#!/bin/sh +command="$1" +interval="$2"; [ -z "$interval" ] && interval=1 + +if [ -z $command ]; then + echo 'Usage: watch.sh "command [options]" [interval], e.g. watch "ifconfig ath0" 2' + echo 'interval is optional and defaults to 1' + exit 1 +fi + +while true; do clear; $command; sleep $interval; done |