> On Aug 6, 2020, at 10:29 PM, Dale R. Worley wrote:
>
> Klaas Vantournhout writes:
>> Recently I came across a surprising undocumented bash-feature
>>
>> $ for i in 1 2 3; { echo $i; };
>>
>> The usage of curly-braces instead of the well-documented do ... done
>> construct was a complete
Klaas Vantournhout writes:
> Recently I came across a surprising undocumented bash-feature
>
>$ for i in 1 2 3; { echo $i; };
>
> The usage of curly-braces instead of the well-documented do ... done
> construct was a complete surprise to me and even lead me to open the
> following question on
Dear Bash-developers,
Recently I came across a surprising undocumented bash-feature
$ for i in 1 2 3; { echo $i; };
The usage of curly-braces instead of the well-documented do ... done
construct was a complete surprise to me and even lead me to open the
following question on stack overflow:
Are you trying to run autocompletion on an nfs mount? Are you using ''ls''
to autocomplete and if so did you run \ls /path/to/dir .. ?
Maybe worth to mention the bash version you are using.
Op do 6 aug. 2020 19:53 schreef George R Goffe :
> Hi,
>
> I apologize for bothering you with this
On 8/6/20 1:53 PM, George R Goffe wrote:
> Hi,
>
> I apologize for bothering you with this question.
>
> I have several directories on a system with > 300k files. When I use filename
> completion bash freezes for over a minute depending on the number of files.
> I'm pretty sure that bash has
On Thu, Aug 6, 2020 at 1:54 PM George R Goffe wrote:
> I have several directories on a system with > 300k files. When I use filename
> completion bash freezes for over a minute depending on the number of files.
> I'm pretty sure that bash has to read the directory to do the completion but
>
On 8/6/20 12:36 PM, k...@plushkava.net wrote:
> On 06/08/2020 17:21, Eli Schwartz wrote:
>> On 8/6/20 11:31 AM, Jason A. Donenfeld wrote:
>>> That doesn't always work:
>>>
>>> set -e
>>> while read -r line; do
>>> echo "$line" &
>>> done < <(echo 1; sleep 1; echo 2; sleep 1; exit 77)
>>>
On 06/08/2020 17:21, Eli Schwartz wrote:
On 8/6/20 11:31 AM, Jason A. Donenfeld wrote:
That doesn't always work:
set -e
while read -r line; do
echo "$line" &
done < <(echo 1; sleep 1; echo 2; sleep 1; exit 77)
sleep 1
wait $!
echo done
I wonder why wait $! doesn't do the job here.
On 8/6/20 11:31 AM, Jason A. Donenfeld wrote:
> That doesn't always work:
>
> set -e
> while read -r line; do
>echo "$line" &
> done < <(echo 1; sleep 1; echo 2; sleep 1; exit 77)
> sleep 1
> wait $!
> echo done
So instead of your contrived case, write it properly. Check the process
On 8/6/20 11:31 AM, Jason A. Donenfeld wrote:
> On Thu, Aug 6, 2020 at 4:49 PM Chet Ramey wrote:
>>
>> On 8/6/20 10:36 AM, Jason A. Donenfeld wrote:
>>> Hi Chet,
>>>
>>> On Thu, Aug 6, 2020 at 4:30 PM Chet Ramey wrote:
On 8/6/20 6:05 AM, Jason A. Donenfeld wrote:
> Hi,
>
>
On Thu, Aug 6, 2020 at 4:49 PM Chet Ramey wrote:
>
> On 8/6/20 10:36 AM, Jason A. Donenfeld wrote:
> > Hi Chet,
> >
> > On Thu, Aug 6, 2020 at 4:30 PM Chet Ramey wrote:
> >>
> >> On 8/6/20 6:05 AM, Jason A. Donenfeld wrote:
> >>> Hi,
> >>>
> >>> It may be a surprise to some that this code here
On 8/6/20 10:48 AM, Chet Ramey wrote:
>> Perhaps another, clunkier, proposal would be to add `wait -s` so that
>> the wait builtin also waits for process substitutions and returns
>> their exit codes and changes $?. The downside would be that scripts
>> now need to add a "wait" after all of above
On 8/6/20 10:36 AM, Jason A. Donenfeld wrote:
> Hi Chet,
>
> On Thu, Aug 6, 2020 at 4:30 PM Chet Ramey wrote:
>>
>> On 8/6/20 6:05 AM, Jason A. Donenfeld wrote:
>>> Hi,
>>>
>>> It may be a surprise to some that this code here winds up printing
>>> "done", always:
>>>
>>> $ cat a.bash
>>> set -e
Hi Chet,
On Thu, Aug 6, 2020 at 4:30 PM Chet Ramey wrote:
>
> On 8/6/20 6:05 AM, Jason A. Donenfeld wrote:
> > Hi,
> >
> > It may be a surprise to some that this code here winds up printing
> > "done", always:
> >
> > $ cat a.bash
> > set -e -o pipefail
> > while read -r line; do
> >echo
On 8/6/20 6:05 AM, Jason A. Donenfeld wrote:
> Hi,
>
> It may be a surprise to some that this code here winds up printing
> "done", always:
>
> $ cat a.bash
> set -e -o pipefail
> while read -r line; do
>echo "$line"
> done < <(echo 1; sleep 1; echo 2; sleep 1; false; exit 1)
> sleep 1
>
On 06/08/2020 14:57, Eli Schwartz wrote:
On 8/6/20 9:15 AM, k...@plushkava.net wrote:
You beat me to it. I was just about to suggest wait $! || exit. Indeed,
I mentioned the same in a recent bug report against wireguard-tools.
So if I understand correctly, you reported the lack of wait $! ||
On 6.8. 15:59, Chet Ramey wrote:
On 8/6/20 8:13 AM, Ilkka Virta wrote:
I think they meant the case where all the files matching the given
beginning have a longer prefix in common. The shell expands that prefix to
the command line after asking to show all possibilities.
Only if you set the
On 8/6/20 9:15 AM, k...@plushkava.net wrote:
> You beat me to it. I was just about to suggest wait $! || exit. Indeed,
> I mentioned the same in a recent bug report against wireguard-tools.
So if I understand correctly, you reported the lack of wait $! || exit
in a script, and the script author
On 06/08/2020 13:33, Eli Schwartz wrote:
On 8/6/20 6:05 AM, Jason A. Donenfeld wrote:
Hi,
It may be a surprise to some that this code here winds up printing
"done", always:
$ cat a.bash
set -e -o pipefail
while read -r line; do
echo "$line"
done < <(echo 1; sleep 1; echo 2; sleep 1;
6 Ağustos 2020 Perşembe tarihinde Greg Wooledge yazdı:
> On Thu, Aug 06, 2020 at 02:14:07PM +0200, Jason A. Donenfeld wrote:
> > On Thu, Aug 6, 2020 at 1:15 PM Oğuz wrote:
> > > set -e o substfail
> > > : <(sleep 10; exit 1)
> > > foo
> > >
> > > Say that `foo' is a command that
On 8/6/20 8:13 AM, Ilkka Virta wrote:
> On 5.8. 22:21, Chris Elvidge wrote:
>> On 05/08/2020 02:55 pm, Chet Ramey wrote:
>>> On 8/2/20 6:55 PM, 積丹尼 Dan Jacobson wrote:
how about doing the expansion first, so entering
$ zz /jidanni_backups/da would then change into
>> >> $ zz
On 8/6/20 6:05 AM, Jason A. Donenfeld wrote:
> Hi,
>
> It may be a surprise to some that this code here winds up printing
> "done", always:
>
> $ cat a.bash
> set -e -o pipefail
> while read -r line; do
>echo "$line"
> done < <(echo 1; sleep 1; echo 2; sleep 1; false; exit 1)
> sleep 1
>
On Thu, Aug 6, 2020 at 2:14 PM Jason A. Donenfeld wrote:
>
> On Thu, Aug 6, 2020 at 1:15 PM Oğuz wrote:
> >
> >
> >
> > 6 Ağustos 2020 Perşembe tarihinde Jason A. Donenfeld
> > yazdı:
> >>
> >> Hi,
> >>
> >> It may be a surprise to some that this code here winds up printing
> >> "done",
On Thu, 6 Aug 2020 15:13:30 +0300, Ilkka Virta wrote:
> I think they meant the case where all the files matching the given
> beginning have a longer prefix in common. The shell expands that prefix
> to the command line after asking to show all possibilities.
>
> $ rm *
> $ touch
On Thu, Aug 06, 2020 at 02:14:07PM +0200, Jason A. Donenfeld wrote:
> On Thu, Aug 6, 2020 at 1:15 PM Oğuz wrote:
> > set -e o substfail
> > : <(sleep 10; exit 1)
> > foo
> >
> > Say that `foo' is a command that takes longer than ten seconds to complete,
> > how would you expect the
On Thu, Aug 6, 2020 at 1:15 PM Oğuz wrote:
>
>
>
> 6 Ağustos 2020 Perşembe tarihinde Jason A. Donenfeld yazdı:
>>
>> Hi,
>>
>> It may be a surprise to some that this code here winds up printing
>> "done", always:
>>
>> $ cat a.bash
>> set -e -o pipefail
>> while read -r line; do
>>echo
On 5.8. 22:21, Chris Elvidge wrote:
On 05/08/2020 02:55 pm, Chet Ramey wrote:
On 8/2/20 6:55 PM, 積丹尼 Dan Jacobson wrote:
how about doing the expansion first, so entering
$ zz /jidanni_backups/da would then change into
>> $ zz /jidanni_backups/dan_home_bkp with below it the question
>>
6 Ağustos 2020 Perşembe tarihinde Jason A. Donenfeld
yazdı:
> Hi,
>
> It may be a surprise to some that this code here winds up printing
> "done", always:
>
> $ cat a.bash
> set -e -o pipefail
> while read -r line; do
>echo "$line"
> done < <(echo 1; sleep 1; echo 2; sleep 1; false; exit
Hi,
It may be a surprise to some that this code here winds up printing
"done", always:
$ cat a.bash
set -e -o pipefail
while read -r line; do
echo "$line"
done < <(echo 1; sleep 1; echo 2; sleep 1; false; exit 1)
sleep 1
echo done
$ bash a.bash
1
2
done
The reason for this is that
29 matches
Mail list logo