Gentoo Archives: gentoo-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: esethome
Date: Fri, 15 Jun 2012 13:54:14
Message-Id: 20120615135313.GF936@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: esethome by Peter Stuge
On 15-06-2012 15:41:03 +0200, Peter Stuge wrote:
> Ian Stakenvicius wrote: > > > Mike Frysinger wrote: > > >>> + # lets see if the username already exists + if [[ > > >>> ! -n $(egetent passwd "${euser}") ]] ; then > > >> > > >> "! -n" -> "-z" > > > > > > Does the $() argument ever need to be double quoted, or do all > > > versions of bash actually have the string argument optional even > > > though that's not what the man page reads? > > > > Ever? Yes, but only if what is being returned can contain spaces > > Sorry, I should have mentioned that I had the case of the empty > string in mind.
Here for the same reason, the difference between [[ and [ is essential. Fabian -- Fabian Groffen Gentoo on a different level

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] RFC: esethome Peter Stuge <peter@×××××.se>