/usr/bin/dr_watch is in draai 20131212-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #!/bin/sh
# This file is maintained at http://git.mdcc.cx/draai
# % while sleep 2; do cat /tmp/c; ( clear; draai peek ) >/tmp/c; done
# % DR_SLEEP=5 dr_watch draai peek
# % watch --version
# watch from procps-ng 3.3.3
# Unlike watch as shipped with Linux procps << 3.3.3,
# it will deal sane with non-ascii output (like UTF-8). (See also
# http://bugs.debian.org/240989.) ( From: Craig Small
# Fixed in procps 3.2.8-3 Date: Fri, 5 Feb 2010 21:46:09 +1100 )
set -e
command=$@
sleep=${DR_SLEEP:-2}
if test -n "$DR_WATCH"
then
exec $DR_WATCH $command
elif command -v watch >/dev/null
then
exec watch --no-title --interval $sleep $command
else
tmpfile=$(mktemp -t dr_watch.XXXXXXXX)
trap 'rm $tmpfile' EXIT
while sleep $sleep
do
(clear; $command) >$tmpfile
cat $tmpfile
done
fi
|