how does pipe work
Posted
by lego69
on Stack Overflow
See other posts from Stack Overflow
or by lego69
Published on 2010-06-01T13:01:09Z
Indexed on
2010/06/01
13:13 UTC
Read the original article
Hit count: 366
hello, explain me please how exactly pipe works, for example I have this snippet of the code
set line = ($<)
while(${#line} != 0)
if(${#line} == 5) then
echo line | sort | ./calculate ${1}
endif
set line = ($<)
end
I need to choose all rows with 5 words and after sort it and after transfer, but I'm confused, how will it work, first of all 'while' will take all information and after that transfer it to sort, or every iteration 'while' will do sort? thanks in advance
© Stack Overflow or respective owner