read -t 0 anomaly

2013-10-04 Thread Kunszt Árpád
I tried to use "read -t 0" to check if there is any data on the STDIN or not. The man page said: If timeout is 0, read returns success if input is available on the specified file descriptor, failure otherwise. Maybe I made a mistake but I tested and I got variable results: arpad@terminus ~ $ f

Re: read -t 0 anomaly

2013-10-04 Thread Kunszt Árpád
On 2013. October 4. 14:51:00 Pierre Gaston wrote: > On Fri, Oct 4, 2013 at 2:20 PM, Kunszt Árpád ... > > > There is a race condition, you cannot know if echo will run before read. I see, and it's logical. But this stills confuses me. arpad@terminus ~ $ for(( i=0; i<10

Problem around brackets, && and ||

2010-05-03 Thread Kunszt Árpád
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-gcc Compilation CFLAGS: -DPROG

Re: Problem around brackets, && and ||

2010-05-03 Thread Kunszt Árpád
2010-05-03 21:25 keltezéssel, Greg Wooledge írta: > On Mon, May 03, 2010 at 07:49:12PM +0200, Kunszt Árpád wrote: > >> Description: >> If the last command in a {...} has && and fails and the {...} >> has an || outside then the outside command will be exec