Collecting all output from shell commands

Yes, it’s nontrivial to read long output indeed, and this is not specific to 1.5.4. See my question here: How to read long output from external command?. There was no answer, so I still don’t know how to do it properly.