summaryrefslogtreecommitdiff
path: root/nocompile/bin
diff options
context:
space:
mode:
authorepochqwert <epoch@hacking.allowed.org>2015-06-28 00:15:29 -0500
committerepochqwert <epoch@hacking.allowed.org>2015-06-28 00:15:29 -0500
commit976c801cbe9ae8d03cae529b57a10cbb588fd92a (patch)
tree8c8a64ed504ec8abde678ddd10ab07d9536f3c50 /nocompile/bin
parent5581f63df9034370cff54aeda44b365439b141fb (diff)
downloadmisc-976c801cbe9ae8d03cae529b57a10cbb588fd92a.tar.gz
misc-976c801cbe9ae8d03cae529b57a10cbb588fd92a.zip
fixed up a lot of warnings. added watch.
Diffstat (limited to 'nocompile/bin')
-rwxr-xr-xnocompile/bin/watch18
1 files changed, 18 insertions, 0 deletions
diff --git a/nocompile/bin/watch b/nocompile/bin/watch
new file mode 100755
index 0000000..d9a6328
--- /dev/null
+++ b/nocompile/bin/watch
@@ -0,0 +1,18 @@
+#!/bin/bash
+function sigwinch {
+ clear
+ WIDTH=$(stty size | cut '-d ' -f2)
+}
+trap sigwinch WINCH
+sigwinch
+if [ "_$DELAY" = "_" ];then
+ DELAY=1
+fi
+while true;do
+ echo -ne "\x1b[7m" #reverse colors
+ echo "running $* @ $(date)" | pad $WIDTH
+ echo -ne "\e[0m" #reset colors
+ $* | pad
+ sleep $DELAY
+ echo -ne "\x1b[H"
+done