#!/bin/ksh # Example script which compares strings against patterns print -n "Enter a string: " read s1 #Test 1 if [[ $s1 == *[A-za-z]* ]]; then print String s1 has an alphabetic character in it fi #Test 2 if [[ $s1 != *[A-za-z]* ]]; then print String s1 does not contain an alphabetic character fi #Test 3 if [[ $s1 == [nN]* ]]; then print String s1 begins with N or n fi #Test 4 if [[ $s1 == @(cod|skate|mullet|plaice|perch) ]]; then print String s1 is a fish fi