bonsix/docs/npc.1

76 lines
1.9 KiB
Groff
Raw Normal View History

2024-02-01 20:41:42 -07:00
.\" Copyright (c) 20232024 DTB <trinity@trinity.moe>
.\" Copyright (c) 20232024 Emma Tebibyte <emma@tebibyte.media>
.\"
.\" 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/>.
.\"
.TH NPC 1
.SH NAME
npc \(en show non-printing characters
.\"
.SH SYNOPSIS
2024-06-03 23:07:19 -06:00
npc
.RB ( -et )
.\"
.SH DESCRIPTION
2024-06-03 23:07:19 -06: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 00:16:15 -06: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-'
followed by the graphical representation for the same character without the
high bit set.
.\"
.SH USAGE
2024-06-03 23:07:19 -06:00
.IP -e
2024-03-27 00:16:15 -06:00
Prints a currency sign ('$') before each line ending.
.IP -t
2024-03-27 00:16:15 -06:00
Prints tab characters as '^I' rather than a literal horizontal tab.
.\"
.SH DIAGNOSTICS
2024-06-03 23:07:19 -06:00
In the event of an error, a debug message will be printed and the program will
exit with the appropriate
.BR sysexits.h (3)
error code.
.\"
.SH BUGS
2024-06-03 23:07:19 -06:00
The program operates in single-byte chunks regardless of intended encoding.
.\"
.SH RATIONALE
2024-06-03 23:07:19 -06:00
POSIX currently lacks a way to display non-printing characters in the terminal
using a standard tool. A popular extension to
.BR cat (1p),
the
.B -v
option, is the bandage solution GNU and other software suites use.
2024-06-03 23:07:19 -06:00
This functionality is a separate tool because its usefulness extends beyond that
of
.BR cat (1p).
.\"
.SH AUTHOR
Written by DTB
.MT trinity@trinity.moe
.ME .
2024-06-03 23:07:19 -06:00
.\"
.SH COPYRIGHT
Copyright © 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later
<https://gnu.org/licenses/agpl.html>.
2024-06-03 23:07:19 -06:00
.\"
.SH SEE ALSO
.BR cat (1p),
.BR cat-v (1)
.I UNIX Style, or cat -v Considered Harmful
by Rob Pike