From db378a556fe17d546501573ada3f2a416d0ee7fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 8 Jun 2021 18:08:33 +0200 Subject: Add 'p' and 'P' utilities --- P | 5 +++++ p | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100755 P create mode 100755 p diff --git a/P b/P new file mode 100755 index 0000000..3c11b20 --- /dev/null +++ b/P @@ -0,0 +1,5 @@ +#!/bin/sh + +# P -- open file processed with p in PAGER + +"$PAGER" /var/tmp/pg 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 -- cgit v1.2.3