4 ms·
I agree, especially for the behaviour from the parent: "ps -f" truncates long lines instead of wrapping, while "ps -f | cat" lets the long lines live How peop
by userbinator 12y ago
I agree, especially for the behaviour from the parent:
"ps -f" truncates long lines instead of wrapping, while "ps -f | cat" lets the long lines live
How people usually discover what these commands do is by running them interactively, and if that results in some output being hidden vs being run noninteractively, then they have little reason to believe that it could yield more output than what they're used to seeing. I think a certain number of "ps" users don't know it can display full paths and commands, if they've only ever used it interactively.
- edwintorok 12y agoOn a quick look through ps's manpage I couldn't find anything about this. Am I missing something?
- mzs 12y ago-w
- edwintorok 12y agoIt doesn't say that it'll do that automatically when run through a pipe.
- mzs 12y agoYep, and the result is I have needless sprinklings of "www" in my shell scripts cause of habit. Technically I don't need it the moment I pipe into grep, but oh well ;) Anyway I personally dislike the SysV-like 'I need to add stuff like -aef' to get all that on-the-screen/into-grep vs the BSD-like it knows about TTY but I can convince it otherwise into stuf like 'less -S' - personal taste I guess.
- edwintorok 12y agoActually I just found this in the 'ps' manual, it looks like the output width is actually undefined! "If ps can not determine display width, as when output is redirected (piped) into a file or another command, the output width is undefined (it may be 80, unlimited, determined by the TERM variable, and so on)."