[LEDE-DEV] [patch master 01/15] Double quote to prevent globbing and word splitting
Jan-Tarek Butt
tarek at ring0.de
Fri Sep 30 17:12:19 PDT 2016
On 10/01/16 01:49, Lars Kruse wrote:
> Hi Jan-Tarek,
>
>
> Am Sat, 1 Oct 2016 01:27:24 +0200
> schrieb Jan-Tarek Butt <tarek at ring0.de>:
>
>
>>> Is there a reason for not adding quotes for CE_VERSION and FILE_NUM?
>>
>> bacause there just nummeric.
>
> personally I would add quotes wherever possible. They would not hurt here.
>
> Whenever I will read the above line in the future, I would think again,
> whether the quotes are missing on purpose or just by accident.
> This is probably again a question of taste.
Ok, thanks for feadback I'll change it.
>
>
>>> Just out of curiosity: do you know, what could be the purpose of the "eval"
>>> construct above?
>>
>> That command is to check the result of echo $spec
>>
>>> I would assume that:
>>> for pattern in $spec; do
>>> behaves exactly like:
>>> for pattern in $(eval echo $spec); do
>>
>> are you shure ?
>
> I have to admit, that I never actually used "eval". I think, it is used for
> assembling commands out of unpredictable tokens.
> My understanding is, that "eval echo $foo" just outputs "$foo".
> In the above context the expansion of $(eval echo $spec) should indeed be the
> same as $spec.
>
> Anyway: since both of us do not know, whether the original author intended some
> esoteric side-effect with this "eval" command, I would suggest to leave this
> line unchanged.
hm, Ok first of all I will leave it uncange ecept, but futhure
I triy to understand ist an rewrite it with comments.
Cheers
Tarek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20161001/bc9a1967/attachment.sig>
More information about the Lede-dev
mailing list