1

The documentation says the following:

[-]opost postprocess output

I don't understand what this means. I have tried to disable this flag to see what it does:

stty -opost -F /dev/pts/0

And I have typed the ls command, and the result had the first line indented:

enter image description here

I still don't get what this flag does!

3

stty -opost deactivates post-processing output. For example, normally sending a <LF> (U+00A0) character to the terminal will automatically insert a <CR> (U+000D) character, to make the cursor go to the beginning of the next line. Most importantly, setting -opost deactivates all processing of output, irrespective of any other output options.

See the manual page for stty(1) for details.

  • So if for example the ocrnl is set, and I disable the opost flag, then the ocrnl flag will be ignored (also all other similar flags responsible for processing of output will be ignored)? – user259241 Nov 6 '17 at 17:58
  • Why not try it out? stty -opost ocrnl; echo -e 'aaa\nbbb'; stty sane – AlexP Nov 6 '17 at 18:11
  • While this is useful information, it is certainly not a comprehensive answer. E.g. I discovered that opost controls whether or not an LF after a full line of text is suppressed. E.g. for an 80 chars wide terminal, outputting 80 dots followed by an LF will not cause a blank line to appear if opost is set. – Arne Vogel Sep 1 '18 at 19:13
  • "deactivates the output processing" and the manual page all give the same (useless) information: That it suppresses output processing. The question is about what that output processing is. – toolforger Apr 2 at 5:23

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.