On 9/20/16 11:04 PM, PePa wrote:
> When sourcing this script (version 1), it will print y after receiving
> an interrupt, but not in the 2 different versions (2 and 3).
>
> # version 1
> echo x
> sleep 99
> echo y
>
> # version 2
> echo x; sleep 99
> echo y
>
> # version 3
> echo x
> sleep 99; e
When sourcing this script (version 1), it will print y after receiving
an interrupt, but not in the 2 different versions (2 and 3).
# version 1
echo x
sleep 99
echo y
# version 2
echo x; sleep 99
echo y
# version 3
echo x
sleep 99; echo y
Is this a bug or expected behaviour??
Thanks for your at
On 3/10/16 10:07 AM, Olof Schonbeck wrote:
> In a small bash script we have a trap to cleanup some files when exiting. You
> run the script by ssh to the machine in question and execute the script. If
> your ssh session dies the trap should trigger and clean up the files as the
> script exit bu
Hi
In a small bash script we have a trap to cleanup some files when exiting. You
run the script by ssh to the machine in question and execute the script. If
your ssh session dies the trap should trigger and clean up the files as the
script exit but this doesn't happen.
I apologize that the
On Fri, Oct 4, 2013 at 3:30 PM, Pierre Gaston wrote:
>
>
>
> On Fri, Oct 4, 2013 at 3:29 PM, Pierre Gaston wrote:
>
>>
>>
>>
>> On Fri, Oct 4, 2013 at 3:08 PM, Kunszt Árpád <
>> arpad.kun...@syrius-software.hu> wrote:
>>
>>> On 2013. October 4. 14:51:00 Pierre Gaston wrote:
>>> > On Fri, Oct 4, 20
On Fri, Oct 4, 2013 at 3:29 PM, Pierre Gaston wrote:
>
>
>
> On Fri, Oct 4, 2013 at 3:08 PM, Kunszt Árpád <
> arpad.kun...@syrius-software.hu> wrote:
>
>> 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 condi
On Fri, Oct 4, 2013 at 3:08 PM, Kunszt Árpád <
arpad.kun...@syrius-software.hu> wrote:
> 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
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; i++ )); do echo -n "" |
On Fri, Oct 4, 2013 at 2:20 PM, Kunszt Árpád <
arpad.kun...@syrius-software.hu> wrote:
> 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, failur
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
10 matches
Mail list logo