bug-coreutils
[Top][All Lists]
Advanced

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

Re: false-negative on file-existance


From: Eric Blake
Subject: Re: false-negative on file-existance
Date: Fri, 06 Nov 2009 18:22:37 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Daniel Reichelt on 11/6/2009 2:12 PM:
> Hi
> 
> I have a file named "a  b" which contains two spaces. Doing a
> 
> $ test -f a\ \ b && echo true
> true
> 
> echoes true as expected. However doing a
> 
> $ test -f "a b" && echo true || echo $?
> 1
> exits with code 1. Is this behaviour expected?

Yes.  "a b" != "a  b".  Check your spacing.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr0y90ACgkQ84KuGfSFAYBiqACgtEhQ3sFk9lV/f/BIX1qD7kpg
jOkAoJYniwrqCe6wcXN3O4IGIpn4TN/6
=adWd
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]