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