[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [platform-testers] new snapshot available: sed-4.4.104-290c
From: |
Jim Meyering |
Subject: |
Re: [platform-testers] new snapshot available: sed-4.4.104-290c |
Date: |
Tue, 27 Mar 2018 22:13:25 -0700 |
On Tue, Mar 27, 2018 at 6:38 PM, Paul Eggert <address@hidden> wrote:
> On 03/27/2018 05:27 PM, Nelson H. F. Beebe wrote:
>>
>> test=${1##*/}
>>
>> I would strongly urge removal of such shell extensions.
>
> That syntax has been standard ever since POSIX formalized the shell in IEEE
> Std 1003.2-1992 (I just pulled out my trusty printed copy and checked). It's
> a bit of a stretch to call it an "extension" 26 years after standardization.
I would strongly urge not to remove such constructs, but rather to
begin your script with the sourcing of init.sh, which ensures the
remainder of the script is interpreted by a sensible shell.
Alternatively, I could have done this:
test=`echo "$1" |sed 's,.*/,,'`
But that would violate my "don't use backticks" rule, of necessity,
since $(...) probably doesn't work in such an old interpreter. So at
first, I was inclined to include this line at the top:
. "${srcdir=.}/testsuite/init.sh"
But there's an even better solution:
sed-sol10-vs-runtest.diff
Description: Binary data