Re:Useful use of cat(1)
by sciurus on Sunday February 26, 2012 @11:43AM
(#3635978)
ps has a nasty habit of truncating its output. Piping it into cat is a way around this. E.G.
[ Parent
| on HN ]
Most generally, it will trick any command into thinking that it's not writing to a tty ; so piping into cat will often remove colors.
Re:Useful use of cat(1)
by burgerbrain on Sunday February 26, 2012 @02:47PM
(#3636548)
Of course if you want colours, you can often force programs to use them anyway. For example, I use the alias:
alias new='ls -lthr --color=always | tail'
Normally ls will not use colours when writing to a pipe (not a tty).
Re:Useful use of cat(1)
by robertduncan on Sunday February 26, 2012 @12:32PM
(#3636095)
Using the -ww flag will produce unlimited width output
Thanks! I'd searched the ps manpage for truncate and length. I don't know why I didn't think to look for width.