0

I want to save the output of the Python help command to a file. Since it uses less, the obvious way is to "s file" while in less. It works, but the words which less shows in bold are screwed up. Any suggestions?

Tons of thanks in advance.

0

You could use less -R (or less -r).

  • the -r option will just make the escape codes visible (without interpreting them),
  • the -R option tries to filter them, cf. man page:

Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is maintained correctly in most cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.