[Cialug] cat -A... what do those characters mean?

John Lengeling john.lengeling at gmail.com
Sun Jul 14 04:48:12 UTC 2019


Ok this is going to show my age and long use of UNIX.

The " o^H+" would have been sent to a printer or paper terminal (DEC LA120
for example) and it would end up printing the o and + on top of each other
making a cheap representation of a bullet.   The file that you have is
formatted already for a printer because of the embedded ^Hs.   Since they
don't quite render correctly in a CRT terminal it was common to filter out
the backspaces and other printer carriage control characters (reverse line
feeds, 1/2 line feeds, shift in, shift out) using the UNIX col(1) command.
Like:  "cat filename | col -b"   Which strips out the ^Hs and make the file
much more readable on a CRT terminal.

I used to do a lot of text processing and typesetting using
nroff/troff/ditroff/roff commands to a photo typesetter and Xerox Diablo
daisywheel printers on DEC PDP/VAX hardware running BSD 4.3 and 2.9.



On Thu, Jul 11, 2019 at 3:34 PM Tim Wilson <tim_linux at wilson-home.com>
wrote:

> I guess the question is, is it carat H, or Control-H? When I see ^H, I
> interpret that as Control-H, which is backspace.
>
> To get a bullet, draw a + then go back (i.e. backspace) and draw an o.
>
> Or cat the file without -A and see what it displays.
>
> On Thu, Jul 11, 2019 at 2:24 PM Todd Walton <tdwalton at gmail.com> wrote:
>
> > On Thu, Jul 11, 2019 at 2:38 PM David Champion <dchamp1337 at gmail.com>
> > wrote:
> > >
> > > I wouldn't rely on the caret notation, look up the hex code as the
> source
> > > of truth. I've seen cases where the character represented in various
> > > notations doesn't match what the actual hex value is in the file.
> >
> > Good to know. Hexdump and xxd are good for that.
> >
> > I've also found "ascii":
> >
> > Name        : ascii
> > Arch        : x86_64
> > Version     : 3.15
> > Release     : 1.el7
> > Size        : 39 k
> > Repo        : installed
> > From repo   : epel
> > Summary     : Interactive ascii name and synonym chart
> > URL         : http://www.catb.org/~esr/ascii/
> > License     : GPLv2
> > Description : The ascii utility provides easy conversion between
> > various byte representations
> >             : and the American Standard Code for Information
> > Interchange (ASCII) character
> >             : table.  It knows about a wide variety of hex, binary,
> > octal, Teletype mnemonic,
> >             : ISO/ECMA code point, slang names, XML entity names, and
> > other representations.
> >             : Given any one on the command line, it will try to
> > display all others.  Called
> >             : with no arguments it displays a handy small ASCII chart.
> >
> > With that, I can give it a literal circumflex and H, and it tells me:
> >
> > todd $ ascii ^H
> > ASCII 0/8 is decimal 008, hex 08, octal 010, bits 00001000: called ^H, BS
> > Official name: Backspace
> > C escape: '\b'
> > Other names:
> >
> > w00t! That will come in handy on occasion.
> >
> > --
> > Todd
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
> >
> --
> Tim
> Required reading: http://bccplease.com/
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
>


More information about the Cialug mailing list