echo'Word1:/c' readword1 echo'word2:/c' readword2 echo'word3:/c' readword3 if(test"$word1"="$word2"-a"$word2"="$word3") then echo'Match:words1,2,&3' elif(test"$word1"="$word2") then echo'Match:words1&2' elif(test"$word1"="$word3") then echo'Match:words1&3' elif(test"$word2"="$word3") then echo'Match:words2&3' else echo'Nomatch' fi