On 15:02 Tue 13 Sep , Amadeusz Żołnowski wrote: > 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?
It's because people want to pretend that it's possible for incredibly outdated systems (those with bash-3 only) to be updated. We're stuck in this limbo because "we" have apparently decided that just waiting a year, as we used to do, isn't good enough anymore; but at the same time, we don't have a better mechanism in place yet. So we're waffling around, doing nothing. -- Thanks, Donnie Donnie Berkholz Council Member / Sr. Developer Gentoo Linux Blog: http://dberkholz.com
pgp6rUsNsnKPn.pgp
Description: PGP signature