2024-02-02 03:41:42 +00:00
|
|
|
|
.\" Copyright (c) 2023–2024 DTB <trinity@trinity.moe>
|
2024-03-27 00:26:51 +00:00
|
|
|
|
.\" Copyright (c) 2023–2024 Emma Tebibyte <emma@tebibyte.media>
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.\"
|
|
|
|
|
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
|
|
|
|
|
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2024-06-24 05:47:29 +00:00
|
|
|
|
.TH NPC 1 2024-06-17 "Harakit X.X.X"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH NAME
|
|
|
|
|
npc \(en show non-printing characters
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH SYNOPSIS
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2023-12-25 00:13:17 +00:00
|
|
|
|
npc
|
2024-06-29 11:18:20 +00:00
|
|
|
|
.RB [ -et ]
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH DESCRIPTION
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
|
Print normally non-printing characters.
|
|
|
|
|
|
|
|
|
|
The program reads from standard input and writes to standard output, replacing
|
|
|
|
|
non-printing characters with printable equivalents. Control characters print as
|
2024-03-27 06:16:15 +00:00
|
|
|
|
a carat ('^') followed by the character '@' through '_' corresponding to the
|
|
|
|
|
character replaced (e.g. control-X becomes '^X'). The delete character (0x7F)
|
|
|
|
|
becomes '^?'. Characters with the high bit set (>127) are printed as 'M-'
|
2023-12-25 00:13:17 +00:00
|
|
|
|
followed by the graphical representation for the same character without the
|
|
|
|
|
high bit set.
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2024-06-18 04:52:58 +00:00
|
|
|
|
.SH OPTIONS
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-06-04 22:11:33 +00:00
|
|
|
|
.IP \fB-e\fP
|
2024-06-18 04:52:58 +00:00
|
|
|
|
Prints a dollar sign ('$') before each newline.
|
2024-06-04 22:11:33 +00:00
|
|
|
|
.IP \fB-t\fP
|
2024-03-27 06:16:15 +00:00
|
|
|
|
Prints tab characters as '^I' rather than a literal horizontal tab.
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH DIAGNOSTICS
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
|
In the event of an error, a debug message will be printed and the program will
|
2024-06-03 00:47:14 +00:00
|
|
|
|
exit with the appropriate
|
|
|
|
|
.BR sysexits.h (3)
|
|
|
|
|
error code.
|
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH BUGS
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
|
The program operates in single-byte chunks regardless of intended encoding.
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH RATIONALE
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2023-12-25 00:13:17 +00:00
|
|
|
|
POSIX currently lacks a way to display non-printing characters in the terminal
|
2024-06-03 00:47:14 +00:00
|
|
|
|
using a standard tool. A popular extension to
|
|
|
|
|
.BR cat (1p),
|
|
|
|
|
the
|
2024-03-27 00:26:51 +00:00
|
|
|
|
.B -v
|
|
|
|
|
option, is the bandage solution GNU and other software suites use.
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-06-18 04:52:58 +00:00
|
|
|
|
This functionality is included in a separate tool because its usefulness extends
|
|
|
|
|
beyond that of
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.BR cat (1p).
|
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH AUTHOR
|
|
|
|
|
|
2024-06-03 00:47:14 +00:00
|
|
|
|
Written by DTB
|
|
|
|
|
.MT trinity@trinity.moe
|
|
|
|
|
.ME .
|
2024-06-04 05:07:19 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH COPYRIGHT
|
|
|
|
|
|
|
|
|
|
Copyright © 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later
|
|
|
|
|
<https://gnu.org/licenses/agpl.html>.
|
2024-06-04 05:07:19 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH SEE ALSO
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.BR cat (1p),
|
2024-06-04 22:11:33 +00:00
|
|
|
|
.BR cat-v (1),
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.I UNIX Style, or cat -v Considered Harmful
|
|
|
|
|
by Rob Pike
|