From cd14e3456833717d4989130676c591c7d6d6bd7c Mon Sep 17 00:00:00 2001 From: DTB Date: Tue, 12 Dec 2023 20:43:18 -0700 Subject: [PATCH] peek(1) man page --- peek/peek.1 | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 peek/peek.1 diff --git a/peek/peek.1 b/peek/peek.1 new file mode 100644 index 0000000..9745d4d --- /dev/null +++ b/peek/peek.1 @@ -0,0 +1,68 @@ +.TH PEEK 1 + +.SH NAME + +peek \(en read from standard input, furtively + +.SH SYNOPSIS + +peek +.RB ( -1eno ) +.RB ( -p +.RB [ program +.RB [ arguments... ]]) + +.SH USAGE + +Peek reads input from standard input with terminal echo disabled, which may be +useful to prevent secrets being spied upon by adversaries watching a user's +screen. +.PP +The +.B -1 +option limits input to a single line (stopping when the newline character is +input). +.PP +The +.B -n +option prints ("iNcludes") the terminating character in output; this is only +useful when combined with the +.B -1 +option. +.PP +The +.B -o +and +.B -e +options configure Peek to output to standard output and/or standard error +respectively and the +.B -p +option configures Peek to output to the standard input of an external program, +e.g. a password hashing utility. +The +.B -p +option is provided as a convenience and to avoid potential insecure programmer +error in scripts. + +.SH DIAGNOSTICS + +Peek prints an error message and exits with the appropriate status from +sysexits(3) if it encounters an error. + +.SH BUGS + +Accepting secrets in shell scripts is not adviseable. +.PP +The user's environment passed through to the program used with the +.B -p +option and their PATH environment variable is used to locate the program. +If used in a safety-critical application it must be ensured that the +environment with which peek is used is not compromised. + +.SH COPYRIGHT + +Public domain. + +.SH SEE ALSO + +env(1), read(1), sh(1)