1 |
On 15-06-2012 15:41:03 +0200, Peter Stuge wrote: |
2 |
> Ian Stakenvicius wrote: |
3 |
> > > Mike Frysinger wrote: |
4 |
> > >>> + # lets see if the username already exists + if [[ |
5 |
> > >>> ! -n $(egetent passwd "${euser}") ]] ; then |
6 |
> > >> |
7 |
> > >> "! -n" -> "-z" |
8 |
> > > |
9 |
> > > Does the $() argument ever need to be double quoted, or do all |
10 |
> > > versions of bash actually have the string argument optional even |
11 |
> > > though that's not what the man page reads? |
12 |
> > |
13 |
> > Ever? Yes, but only if what is being returned can contain spaces |
14 |
> |
15 |
> Sorry, I should have mentioned that I had the case of the empty |
16 |
> string in mind. |
17 |
|
18 |
Here for the same reason, the difference between [[ and [ is essential. |
19 |
|
20 |
Fabian |
21 |
|
22 |
-- |
23 |
Fabian Groffen |
24 |
Gentoo on a different level |