commit 5e1937c74f11f5de18ffe2706acdaa319458a5e3
parent 51a6473ad264dd1fb0971d2f1fca7fbbe5159790
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 1 Apr 2019 17:14:49 +0200
Read commands file and fix shellcheck warning
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bin/watch.sh b/bin/watch.sh
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -e
+[ -f ~/.commands.sh ] && . ~/.commands.sh
+
waitsecs=5
if [ $# -lt 1 ]; then
@@ -10,7 +12,7 @@ fi
while : ; do
clear
- echo -n "Every ${waitsecs}s: $@"
+ echo -n "Every ${waitsecs}s: $*"
echo -e "\t $(hostname): $(date)\n"
"$@"
sleep "$waitsecs"