I tried to understand how “while read” works in bash, and I came up with a behavior that I cannot explain:
root@antec :/
It works fine with "while read":
root@antec :/
Can someone explain why it does not work when reading is used without yet? Moreover, I do not understand how the value of "var" in the main shell can be seen from the supposedly subshell after the pipe.
thanks
source share