Maybe, my explanation of the problem was not clear :
I'm progaming a client/server using netcat
On the server :
if [ "$var" = "xx" ]
while [ ! "$choice" = "quit" ]
I start the server and after I do : echo "xx" | netcat localhost 10000
The fisrt read is done and receive the "xx" from the echo. After, I have a problem because the standard input has been set to the echo and I would like that "read choice" read what is written throught the keyboard.
The problem is that the "1" is printed to the screen but the "2" is never printed because the second read waits for someting from the echo.
if someone could help me...