aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile1
-rw-r--r--README.markdown2
-rw-r--r--bin/p.sh1
-rw-r--r--man/man1/p.1df27
5 files changed, 32 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 4d9ef923..a539a8f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,6 +63,7 @@ bin/mw
bin/nlbr
bin/onl
bin/osc
+bin/p
bin/pa
bin/paz
bin/ped
diff --git a/Makefile b/Makefile
index d570e6b8..f35e1917 100644
--- a/Makefile
+++ b/Makefile
@@ -141,6 +141,7 @@ BINS = bin/ap \
bin/ped \
bin/pit \
bin/plmu \
+ bin/p \
bin/pp \
bin/pph \
bin/pst \
diff --git a/README.markdown b/README.markdown
index 6b0ff38e..c35d3790 100644
--- a/README.markdown
+++ b/README.markdown
@@ -507,6 +507,8 @@ Installed by the `install-bin` target:
* `onl(1df)` crunches input down to one printable line.
* `osc(1df)` implements a `netcat(1)`-like wrapper for `openssl(1)`'s
`s_client` subcommand.
+* `p(1df)` prints concatenated standard input; `cat(1)` as it should always
+ have been
* `pa(1df)` prints its arguments, one per line.
* `pp(1df)` prints the full path of each argument using `$PWD`.
* `pph(1df)` runs `pp(1df)` and includes a leading `$HOSTNAME:`.
diff --git a/bin/p.sh b/bin/p.sh
new file mode 100644
index 00000000..5b59986e
--- /dev/null
+++ b/bin/p.sh
@@ -0,0 +1 @@
+exec cat -- "${@:--}"
diff --git a/man/man1/p.1df b/man/man1/p.1df
new file mode 100644
index 00000000..2d291fc1
--- /dev/null
+++ b/man/man1/p.1df
@@ -0,0 +1,27 @@
+.TH P 1df "May 2017" "Manual page for p"
+.SH NAME
+.B p
+\- print standard input to standard output
+.SH SYNOPSIS
+.B p
+FILE1 [FILE2...]
+.br
+prog1 |
+.B
+p
+.br
+prog1 |
+.B
+p
+FILE1 - FILE2
+.SH DESCRIPTION
+.B p
+prints concatenated standard input from files to, and nothing else; cat(1) as
+it always should have been--no flags, and hence no need for end-of-options for
+filenames that start with a dash.
+.P
+Quicker to type, too.
+.SH SEE ALSO
+cat(1)
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>