Comment on Explorations in UnixComments−nipunn131313yhead -3 data* | cat has the same result as head -3 data*Pipe sends stdout to stdin of the next process. cat sends stdin back to stdout. Piping to cat is rarely eventful (unless you use a flag like cat -n).−pepve13ySome tools adjust their output based on it going to a terminal or not. Try 'ls' versus 'ls | cat'.−mseebach13yIndeed. I often use ps | cat to get the full command line for processes (that's otherwise truncated). All hail Java command lines.−jcurbo13yTry 'ps auxw' - the w enables wide output.−mlni13yAnd for really wide commands (like java) you can add another w to get the whole thing: ps auxww
Comments
head -3 data* | cat has the same result as head -3 data*
Pipe sends stdout to stdin of the next process. cat sends stdin back to stdout. Piping to cat is rarely eventful (unless you use a flag like cat -n).
Some tools adjust their output based on it going to a terminal or not. Try 'ls' versus 'ls | cat'.
Indeed. I often use ps | cat to get the full command line for processes (that's otherwise truncated). All hail Java command lines.
Try 'ps auxw' - the w enables wide output.
And for really wide commands (like java) you can add another w to get the whole thing: ps auxww