> On 01/04/2011 01:54 AM, Jim Meyering wrote:
>>> Just for grins, how about trying:
>>>
>>> /bin/sh -c 'v=`exec 2>/dev/null;nonesuch`'
>>>
>>> I think it works for me on a Sun box:
> 
> It also works on FreeBSD.
> 
>> Good idea.  Avoiding an unnecessary sub-shell is always welcome.
>> I'll wait for your "ok".
> 
> Looks good to me.  We've already got one sub-shell (the ``), so avoiding
> the second (the ()) is indeed nicer, and here the exec trick works
> precisely because it only affects the `` subshell.

Done and pushed.  Thanks.

Reply via email to