Can not pipe the output of echo command to ls
everyone, i found this strange problem ( maybe it is a feature ) this afternoon.
In my current working directory, there are 5 files, namely a,b,c,d,e

If i issue the following command 

echo "a"| ls -l


What I expect is only the detailed information of file a is listed.
But from the output, the detailed information of file a,b,c,d,e are listed.
It seems as if the command before the pipe is not working, eg, the following command will output exactly as if only "ls -l " is executed.

echo "whatever_you_type"| ls -l


I am confused, can anybody help to explain this issue ?
I know i can workaround this problem by using xargs, something like echo "a" |xargs ls -l
But I want to know why.


Can not pipe the output of echo command to ls
===

everyone, i found this strange problem ( maybe it is a feature ) this afternoon.
In my current working directory, there are 5 files, namely a,b,c,d,e

If i issue the following command 

echo "a"| ls -l


What I expect is only the detailed information of file a is listed.
But from the output, the detailed information of file a,b,c,d,e are listed.
It seems as if the command before the pipe is not working, eg, the following command will output exactly as if only "ls -l " is executed.

echo "whatever_you_type"| ls -l


I am confused, can anybody help to explain this issue ?
I know i can workaround this problem by using xargs, something like echo "a" |xargs ls -l
But I want to know why.

