On 12/22/2011 08:46 AM, Alex Bradbury wrote:
>> +
>> +in_host() {
>> +    tmpchr=$tmpdir/chr.log
> 
> By far the most common error likely to appear in any of these test
> scripts is insufficient shell quoting causing e.g. breakages when the
> scripts are run from a directory with spaces.

Shell assignments do not need quoting, since they are not subject to
argument splitting or filename expansion in the first place.

Blindly requiring double-quoting of all shell variables and command
substitutions can actually introduce problems if you care about
portability to ancient shells, since constructs like:

var=`command "with quotes"`

are actually MORE portable than:

var="`command "with quotes"`"

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to