On Mon, 9 Jan 2006, Frank Staals wrote:

> 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" ?

As others have pointed out: [ is a synonym for test(1), which uses -gt, 
-ge, -eq, -ne, -lt, -le for numeric comparisons. For string comparisons, 
it uses <, !=, =, and >.

Your original expression didn't work because "<" is also a shell 
meta-character used to indicate file redirection. To get something like 
that to work, you'd need to quote it somehow:

        if [ "$a" \< "$b" ]; then ... ; fi

or

        if [ "$a" '<' "$b" ]; then ... ; fi


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
I'm the dandy information superhighwayman.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to