diff options
author | epochqwert <epoch@hacking.allowed.org> | 2015-06-28 00:19:50 -0500 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2015-06-28 00:19:50 -0500 |
commit | 75f05369650cc05002b9c131a8453714dcf14dde (patch) | |
tree | 6e8136685772dadd0239d5bbb61a377bbd457ff6 /nocompile | |
parent | 976c801cbe9ae8d03cae529b57a10cbb588fd92a (diff) | |
download | misc-75f05369650cc05002b9c131a8453714dcf14dde.tar.gz misc-75f05369650cc05002b9c131a8453714dcf14dde.zip |
fixed watch to not need bash
Diffstat (limited to 'nocompile')
-rwxr-xr-x | nocompile/bin/watch | 10 |
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 |