This question already has an answer here:

When I issue:

[dave@dhost ~]$ which tar | ls -l

I get the output of ls -l of the pwd.

I expected to get:

-rwxr-xr-x. 1 root root 395472 Feb 21 2013 /bin/tar

Why doesn't the pipe work as I expected in this case?

marked as duplicate by don_crissti, Michael Homer, Ulrich Schwarz, jasonwryan, Networker Jan 2 '15 at 6:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Note that ls -l $(which tar) would work, but I am seeking an explanation as to why the pipe doesn't work in this case. Thanks. – boxofchalk1 Jan 2 '15 at 5:03
  • Yes, you're right. – boxofchalk1 Jan 2 '15 at 5:52

Browse other questions tagged or ask your own question.