Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

evaluating a condition



Hi,

As a beginner in zsh, I would have a question concerning an 'if'
structure.

I have the following script, and I would like to print the numbers in the
terminal from ${min} to ${max}, if both of them are smaller than 10.

export min=$3;export max=$4;
        if (($[min]<10 && $[max]<10)) then
	        for i in {${min}..${max}}; do echo $i; done
        fi

However, this prints the numbers even if ${max}>10

Can someone help?

Gaspar



Messages sorted by: Reverse Date, Date, Thread, Author