On Monday 24 September 2007 21:56:49 Donnie Berkholz wrote:
> >     if [[ "$(gcc-major-version)" -gt "3" ]] || \
> >        ( [[ "$(gcc-major-version)" -eq "3" ]] && [[ "$(gcc-minor-version)" 
> > -gt "3" ]] )
>
> Code block { } might be good here instead of a subshell, or perhaps it
> could use logic that's less convoluted such as if..then. Also don't need
> the double quotes.

Or it could be as simple as:

if [[ $(gcc-major-version) -gt 3 || \
    ( $(gcc-major-version) -eq 3 && $(gcc-minor-version) -gt 3 ) ]]

[[ allows grouping of conditions without spawning subshells.

-- 
Bo Andresen

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

Reply via email to