aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
Diffstat (limited to 'p')
-rwxr-xr-xp7
1 files changed, 7 insertions, 0 deletions
diff --git a/p b/p
new file mode 100755
index 0000000..fa6db76
--- /dev/null
+++ b/p
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# p -- maybe view command output in pager
+
+[ -t 0 ] && exec /bin/sh -c '"$@" | "$0"' "$0" "$@"
+
+cat | tee /var/tmp/pg