Re: [PATCH] tests: avoid problematic $(< file) shell construct

2013-12-16 Thread Bernhard Voelker
On 12/16/2013 05:10 PM, Pádraig Brady wrote: > On 12/16/2013 02:53 PM, Bernhard Voelker wrote: >> The check is quite rough anyway because nothing prevents >> a user from writing a command after the redirection: >> >> u="$(> >> However, I think such use is very rare. > > Well not really. You coul

Re: [PATCH] tests: avoid problematic $(< file) shell construct

2013-12-16 Thread Pádraig Brady
On 12/16/2013 02:53 PM, Bernhard Voelker wrote: > On 12/16/2013 03:27 PM, Eric Blake wrote: >> On 12/15/2013 12:59 PM, Bernhard Voelker wrote: >> >>> +# Avoid problematic redirect-only statements in $(...) shell construct. >>> +# Although the "man bash" states that this is faster, it does not seem

Re: [PATCH] tests: avoid problematic $(< file) shell construct

2013-12-16 Thread Bernhard Voelker
On 12/16/2013 03:27 PM, Eric Blake wrote: > On 12/15/2013 12:59 PM, Bernhard Voelker wrote: > >> +# Avoid problematic redirect-only statements in $(...) shell construct. >> +# Although the "man bash" states that this is faster, it does not seem >> +# to be portable. Issues have been seen on dash

Re: [PATCH] tests: avoid problematic $(< file) shell construct

2013-12-16 Thread Eric Blake
On 12/15/2013 12:59 PM, Bernhard Voelker wrote: > +# Avoid problematic redirect-only statements in $(...) shell construct. > +# Although the "man bash" states that this is faster, it does not seem > +# to be portable. Issues have been seen on dash v0.5.6 and on the shell > +# on FreeBSD. > +sc_pr

Re: [PATCH] tests: avoid problematic $(< file) shell construct

2013-12-15 Thread Bernhard Voelker
[moving this topic to bug-gnulib, cc'ing coreutils] On 12/12/2013 05:33 PM, Pádraig Brady wrote: > On 12/07/2013 07:41 PM, Pádraig Brady wrote: >> On 12/07/2013 07:11 PM, Pádraig Brady wrote: >>> On 12/07/2013 05:39 PM, Bernhard Voelker wrote: I'm afraid I'll be tempted to use the $(>>> again