Excerpts from Joshua Kinard's message of 2011-09-13 14:26:02 +0200: > > You don't need -n/-z with [[. > > > > [[ $var ]] == [[ -n $var ]] > > [[ ! $var ]] == [[ -z $var ]] > > What about other comparisons, like -f, -e, or -d?
Same as inside [, but no need of quotes inside [[. > Also, is this a bash4-only thing, or bash3 and/or bash2 as well? I'm not sure. OT: When I was going through recruitment process, dberkholz pointed to me that I use things bash4-only. And again: why we need to stick to ancient 3 version? I would understand pseudo POSIX compatibility, but what is the benefit of bash3 compatibility while bash4 is stable already? -- Amadeusz Żołnowski PGP key fpr: C700 CEDE 0C18 212E 49DA 4653 F013 4531 E1DB FAB5
signature.asc
Description: PGP signature