On Tuesday 02 October 2007, George Shapovalov wrote:
> Tuesday, 2. October 2007, Roy Marples Ви написали:
> > And here it is
>
> -       if [[ "${FORTRANC}" = "gfortran" ]]; then
> +       if [ "${FORTRANC}" = "gfortran" ]; then
>
> You know, it is funny to see these lines after all those cries about how [
> is evil and we should really never ever use it but rather always use [[
> form :).
>
> Oh, btw, does the compliant sh correctly process the most cited
> composition? : [ -n $foo ] && [ -z $foo ] && echo "huh?"
> (straight from devmanual, the primary reason why [ is  considered bad)

[...] will crap a brick if foo expands to multiple arguments which is why 
[[...]] is preferred ... it'll do the sane thing and work correctly 
regardless
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to