Can you help me validate 2 variables?The first is an input date from the user and should be like this (yyyy-mm-dd). The second variable is an input time from the user and should be like this(hh:mm).When the input is wrong i want to give the chance to the user to insert again the date or time !! I appreciate your help. Its my 2nd script but never faced similar problem before!!
well i have another issue..Don't know if you can help me..
I read a variable from the user and then i use awk to search a file to find matching dates with the variable given so i can print the line(the folder its like a calendar)! I wrote this code but its completely wrong.
echo Give the date you wish ti display
read date
awk '{ if ($1=$date) print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6}' <file