Re: Shell script cleanups/style changes?

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> David Kastrup <dak@xxxxxxx> writes:
>
>> Junio C Hamano <gitster@xxxxxxxxx> writes:
>>
>>> However, there is a line we need to draw when bending bacwards for
>>> compatibility, and I think a system that does not have a working
>>> command substitution $( ... )  is on the other side of that line.
>>
>> Not an issue.  But apparently, ${parameter#word} is for Solaris.  I'd
>> still like to get confirmation that it is indeed /bin/sh, but if it
>> is, the current code is not good for Solaris.
>
> I happen to feel ${parameter#word} is more esoteric than $(cmd).
> If a system does not even do the latter, then avoiding the
> former to help such a system is a futile effort.

The situation is that we currently don't avoid the former.  Robert
said that he had prepared a patch that would do so.

It would make sense to either encourage him to present his patch
(though we probably don't know for sure that there are indeed shells
for which the former works worse than the latter), or permit further
use of ${parameter#word} where it makes things more readable.

But "only a little bit of ${parameter#word}, please" seems pointless.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux