2

I've been wondering about this for a while. Whenever I run a command of the form "man [command] >> file.txt", there's a weird phenomenon where words that were bold when I viewed the man page in Terminal appear in the text file with each letter repeated twice.

For example,

DESCRIPTION

The find utility recursively descends the directory tree for each path listed

turns into

DDEESSCCRRIIPPTTIIOONN

The ffiinndd utility recursively descends the directory tree for each path listed

Why is this? I can't think of a file encoding for which this makes sense. (If it encoded "bold" as "write each letter twice", then the band Abba would show up as A b a, among other problems...)

NcAdams
  • 2,521
  • 4
  • 21
  • 32
  • Which system are you on? – dougEfresh Jul 10 '13 at 15:04
  • 3
    I recommend taking a look at that file with `od`, `hexdump` or something similar - I bet there are characters in between the "double" letters. Some old terminals implemented bold by a backspace and overprint method... You'll find similar oddities where there is underlining, which was usually implemented by a letter-backspace-underline sequence... – twalberg Jul 10 '13 at 15:05
  • It's a formatting quirk when viewing the file as raw text, use `$ man ` to read the file and view correctly. Example, on a Mac `$ man /usr/share/doc/postfix/SQLITE_README` – Rian Rizvi Jan 26 '17 at 17:22

1 Answers1

3

Try man -7 or man --ascii [command] >> file.txt which will export man pages to ascii.

dougEfresh
  • 457
  • 2
  • 8