On 12/07/2013 05:39 PM, Bernhard Voelker wrote:
> On 12/07/2013 04:39 PM, Pádraig Brady wrote:
>> bash and ksh were fine with this, but dash 0.5.6 wasn't so...
>>
>> commit 645102c94cf8fddf1251940b2af884871befb388
>> Author: Pádraig Brady <[email protected]>
>> Date:   Sat Dec 7 15:36:33 2013 +0000
>>
>>     tests: avoid problematic $(< file) shell construct
>>
>>     * tests/cp/link-deref.sh: This was seen to cause an issue
>>     with dash v0.5.6 at least, so change to a simpler expression.
>>
>> diff --git a/tests/cp/link-deref.sh b/tests/cp/link-deref.sh
>> index 91a6c5d..c12dfc8 100755
>> --- a/tests/cp/link-deref.sh
>> +++ b/tests/cp/link-deref.sh
>> @@ -55,7 +55,7 @@ for src in dirlink filelink danglink; do
>>          "$result"   \
>>          "$ino_dst"  \
>>          "$typ_dst"  \
>> -        "$(< err)"  \
>> +        "$(cat err)"  \
>>          > out
>>
>>        # What was expected?
>>
> 
> +1, thanks.
> 
> I'm afraid I'll be tempted to use the $(<file) construct next time
> again.  Do you this it's worth adding a new syntax-check?

Probably. POSIX says:

"With the $( command) form, all characters following the open parenthesis
to the matching closing parenthesis constitute the command. Any valid shell
script can be used for command, except a script consisting solely of 
redirections
which produces unspecified results."

> BTW: how did you generate the mail? It seems it got a bit mangled
> this time.

Sorry cut n paste. I'll attach in future.

Pádraig


Reply via email to