coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Pádraig Brady
Subject: Re: [PATCH] tests: avoid problematic $(< file) shell construct
Date: Thu, 12 Dec 2013 16:33:41 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

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 $(<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 this would probably be a test non specific to coreutils,
> so would be based on something like sc_prohibit_reversed_compare_failure in
> gnulib#s top/maint.mk.
> 
> So I'll apply without this syntax check for now.

I see the shell on freebsd silently converts "$(< file)" to ""
So more reason for a gnulib syntax check




reply via email to

[Prev in Thread] Current Thread [Next in Thread]