git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
5c4a6b5
)
contrib/freifunk-common: add watch.sh script to simulate the watch command
author
Manuel Munz
<redacted>
Wed, 30 May 2012 18:26:09 +0000
(18:26 +0000)
committer
Manuel Munz
<redacted>
Wed, 30 May 2012 18:26:09 +0000
(18:26 +0000)
contrib/package/freifunk-common/files/usr/bin/watch.sh
[new file with mode: 0755]
patch
|
blob
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
(executable)
index 0000000..
728526b
--- /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
git clone https://git.99rst.org/PROJECT