#!/bin/sh i=9 k=8 while test $i -gt 4 ; do j=`expr $i + 1` if [ $i -gt 6 ] ; then j=`expr $i + 100`; fi echo $i -- $j i=`expr $i - 1` done KK="k1d" KL="k1d" KM="kd" if [ $KK != $KL ] then echo yes else echo no fi if [ $KK = $KL ]&&[ $KK != $KM ] then echo yes1 else echo no1 fi if [ $KK = $KL ] || [ $KK != $KM ] ;then echo yes2 ; else echo no2 fi ========================= kondo@kondo-PC ~/shell $ source if.sh 9 -- 109 8 -- 108 7 -- 107 6 -- 7 5 -- 6 no yes1 yes2