Re: Newbie Q: Pipe Operation Doesn't Work



You don't really need a pipe for that, you can use:

$ ll `which acroread`

They `` execute the inclosed command and the output replace the statement.

I don't think that 'ls' read standard input. So the pipe commande doesn't work.

Jean

-----------

texmex wrote:
Hi,

I'm a novice at linux. I am trying to do what I thought would be a simple
pipe command but things aren't working out that way.


Here's what I'm after:

 1) Perform 'which' on a given command (maybe just to prove it's there or something)
 2) Find out if the command is linked, chmod'd, sliced, diced, etc. by listing it
 3) Combine both which and ls in a compound statement - piped - on one line.

$ which acroread
 /usr/bin/acroread

$ ll /usr/bin/acroread
 lrwxrwxrwx     30 Nov 22 02:15 /usr/bin/acroread -> /usr/lib/acroread/bin/acroread

$ which acroread | ll

  The results of the pipe operation yields a listing of my current directory which
is pretty much not what I wanted.

Please help.

Thanks.
.