[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] vc-list-files: avoid failure when /bin/sh is dash
From: |
Eric Blake |
Subject: |
Re: [PATCH] vc-list-files: avoid failure when /bin/sh is dash |
Date: |
Tue, 21 Jul 2009 17:00:35 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Jim Meyering <jim <at> meyering.net> writes:
> That is because bash and dash work differently:
> $ for i in bash dash; do $i -c 'a=odd; a=ok b=$a; echo '$i' $b'; done
> bash ok
> dash odd
Good catch. And yes, this is already documented in the autoconf manual on
shell portability; the order of assignments is unspecified (so you should treat
dependent variables similarly to how you follow C rules for sequence points).
--
Eric Blake