hi ,
Consider the following code
#!/bin/sh
# addagenda
isMonthName()
{
case $(echo $1 | tr '[[:upper:]]' '[[:lower:]]') in
jan*|feb*|mar*|apr*|may*|jun*) return 0 ;;
jul*|aug*|sep*|oct*|nov*|dec*) return 0 ;;
*) return 1 ;;
esac
}
echo -n "Enter Day of event "
read word1
x=isDayName $word1
echo $x
In the above script when i print the value of x ,Null value is getting printed.(It should print 0 or 1)
any help pls.
Cheers
RRK