From 75f05369650cc05002b9c131a8453714dcf14dde Mon Sep 17 00:00:00 2001 From: epochqwert Date: Sun, 28 Jun 2015 00:19:50 -0500 Subject: fixed watch to not need bash --- nocompile/bin/watch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nocompile') 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 -- cgit v1.2.3