aboutsummaryrefslogtreecommitdiff
path: root/bin/clrd
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-02 11:26:39 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-02 11:26:39 +1200
commitca632bed9240bce35c6acffceeec7c46a3d9b3f1 (patch)
tree8c17a2f236f7146b78157239e75cd4fb2d3784a5 /bin/clrd
parentStrip trailing newline from clrd() (diff)
downloaddotfiles-ca632bed9240bce35c6acffceeec7c46a3d9b3f1.tar.gz
dotfiles-ca632bed9240bce35c6acffceeec7c46a3d9b3f1.zip
Move clrd()/clwr() to scripts
clrd(1) is POSIX sh, but clwr(1) ideally needs Readline, so I've left it as #!/bin/bash for now.
Diffstat (limited to 'bin/clrd')
-rwxr-xr-xbin/clrd11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/clrd b/bin/clrd
new file mode 100755
index 00000000..0e41d2db
--- /dev/null
+++ b/bin/clrd
@@ -0,0 +1,11 @@
+#!/bin/sh
+self=clrd
+if [ "$#" -ne 1 ] ; then
+ printf >&2 '%s: Need input file\n' "$self"
+ exit 2
+elif ! [ -t 1 ] ; then
+ printf >&2 '%s: stdout not a terminal\n' "$self"
+ exit 2
+fi
+clear
+tail -f -- "$@"