xargs - question

view full story

http://www.linuxquestions.org – Hi, I would like to ask the following: 1) ls -l |grep test -> this will grep every "ls -l" output line 2) ls -1 |xargs grep test -> this will grep every single file with test 3) ls -1 |xargs echo -> this will echo directory list 4) ls -1 |echo -> this does nothing!!! My question is: how some command can recive input from "both sides" (grep can grep whole output or every single file - xargs, the same is for i.e. wc command). 4) echo does nothing (it's a single echo command) Thank you (HowTos)