1.

Solve : Pipes vs I/O redirection?

Answer»

Hello! Can somebody tell my why first code works as expected:

Code: [Select]echo 1 | { read x; echo $x; }
and the second ONE doesn't:

Code: [Select]echo 1 >&0; read x; echo $x;
? I expect 1 outputted but in second case I have to PRESS RETURN before it.

- Best regards, Alvin SEVILLE.



Discussion

No Comment Found