[TUHS] basic tools / Universal Unix

Steffen Nurpmeso steffen at sdaoden.eu
Wed Oct 18 06:22:27 AEST 2017

Tony Finch <dot at dotat.at> wrote:
 |Dan Cross <crossd at gmail.com> wrote:
 |> This is an aside, but I must admit -- with a sense of mild shame --
 |> that the '-v' option to cat is one that I use with some regularity.
 |4.4BSD has the vis(1) and unvis(1) utilities which are more principled
 |implementations of this feature (with corresponding section 3 functions).
 |It's slightly annoying being on Linux without vis and having to resort to
 |`cat -v` like some kind of savage.

Stop!  The inner circle of Unix/POSIX standard developers have
(again) shown great wisdom and have put it down black on white:

  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.

But mind you, in preparation of this email i found a bug in
Busybox sed(1) which simply echoes nothing for the above.

|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

More information about the TUHS mailing list