Im looking to use an integer operator in an 'if' loop statement. I need the math to read say that X is less than Y but greater than Z. So basically, z > x> y

This only works with integer arithmetic: #!/bin/ksh z=4 x=5 y=6 if [[ $x -gt $z && $x -lt $y ]] then echo "x is greater than z and x is less than y" fi

Ask Your Question

Weekly Poll

Do you think the longer-range Nissan Leaf will shake up the electric car market?

Discuss in The Lounge

Poll History