Search Results

Search: Posts Made By: MyMorris
14,067
Posted By Corona688
If this were C, you'd set the file descriptors...
If this were C, you'd set the file descriptors non-blocking and use the select() system call to tell when one file descriptor or the other has data ready to be read at any particular time.

The...
14,067
Posted By Corona688
I don't think I really understand what you're...
I don't think I really understand what you're trying to do, then. Could you give a little pseudocode?
14,067
Posted By Corona688
Yes, it will block. Since it's bash, you...
Yes, it will block.

Since it's bash, you could have it time out eventually if the user doesn't type anything ( read -t 1 userinput < /dev/tty )
14,067
Posted By Corona688
Read user input from /dev/tty, to avoid...
Read user input from /dev/tty, to avoid accidentally reading input from the pipe or file instead. /dev/tty will always be the current terminal, if any.

... | while read LINE
do
printf...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 11:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy