Advertisement

Terminal Tip: Output man pages as plain text with col

Ever try to open a man page in TextEdit using man | open -f? You end up with the kind of unreadable repeated characters shown here. This all dates back to the days of dot matrix and daisy wheel printing when the only way you could produce bold type was to repeatedly print characters. Fortunately, there's an easy way to convert man pages into simple, non-redundant text. Use the command-line utility col with the -b flag enabled. For example, man col | col -b | open -f will open the col man page in TextEdit without repeated characters. The -b flag tells col to exclude all but the last character written to any column, ignoring any backspaces and repeats.