Re: [dev] cat -v

From: Kyryl Melekhin <k.melekhin_AT_gmail.com>
Date: Sun, 30 Jan 2022 17:59:18 +0000

Greg Minshall <minshall_AT_umich.edu> wrote:

> i think it was a Rob Pike paper, maybe Usenix, probably in the 1990s.
> the idea, iirc, is that you can always pipe the output of cat(1) into
> od(1), or into any other program you wanted, so keep cat simple. good
> paper (but, sometimes i do `cat -v`).

By the way, here is excerpt from POSIX manual:

RATIONALE
Historical versions of the cat utility include the -e, -t, and -v,
options which permit the ends of lines, <tab> characters, and invisible
characters, respectively, to be rendered visible in the output. The
standard developers omitted these options because they provide too fine
a degree of control over what is made visible, and similar output can
be obtained using a command such as:


sed -n l pathname

The latter also has the advantage that its output is unambiguous,
whereas the output of historical cat -etv is not.
Received on Sun Jan 30 2022 - 18:59:18 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 01 2022 - 00:48:07 CET