summaryrefslogtreecommitdiff
path: root/nocompile/bin
diff options
context:
space:
mode:
Diffstat (limited to 'nocompile/bin')
-rwxr-xr-xnocompile/bin/watch10
1 files changed, 5 insertions, 5 deletions
diff --git a/nocompile/bin/watch b/nocompile/bin/watch
index d9a6328..ccd94b3 100755
--- a/nocompile/bin/watch
+++ b/nocompile/bin/watch
@@ -1,5 +1,5 @@
-#!/bin/bash
-function sigwinch {
+#!/bin/sh
+sigwinch() {
clear
WIDTH=$(stty size | cut '-d ' -f2)
}
@@ -9,10 +9,10 @@ if [ "_$DELAY" = "_" ];then
DELAY=1
fi
while true;do
- echo -ne "\x1b[7m" #reverse colors
+ printf "\x1b[7m" #reverse colors
echo "running $* @ $(date)" | pad $WIDTH
- echo -ne "\e[0m" #reset colors
+ printf "\e[0m" #reset colors
$* | pad
sleep $DELAY
- echo -ne "\x1b[H"
+ printf "\x1b[H"
done