Date validation in Unix shell script (ksh)
<p>I am validating the date in Unix shell script as follow:</p>

<pre><code>CheckDate="2010-04-09"
regex="[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-3][0-9]"

if [[ $CheckDate = *@$regex ]]
then
echo "ok"
else
echo "not ok"
fi 
</code></pre>

<p>But ksh it is giving output as not okay.. pls help.. i want output as ok</p>