Shellscript syntax question

Luke Bakken luke.bakken at gmail.com
Mon Jan 9 14:04:32 PST 2006


> About the asteriks : No they weren't but for some reason Thunderbird had
> problems with the color remaining from the KATE Syntax-hilighting.
> Anyway: thanks for the solusion, but what would be the expressions for
> ">" "less or equal" and "greater or equal" ?

Frank,

Since you're getting into shell programming beyond the very basics I
would recommend using a more "able" shell like ksh or bash for your
programming or learning a scripting language like perl, ruby or
python.

For instance, in ksh to do arithmetic comparisons you use the (( )) syntax:

if (( VAR1 <= VAR2))
then
    print VAR1 $VAR1 is less than VAR2 $VAR2
fi


More information about the freebsd-questions mailing list