I am new to this so this might seem like a dumb question but I just can not get this code to work. It appears that the grep is looking for the variable name and not its value. Thanks any help is appriciated.
if [ "$file" == "osi_OpenInterest" ]
then
count=`cat timestamps.txt | grep "${file}" | grep "${currdate}" | grep "07:" | grep "AM" | wc -l`
if [ $count -eq 0 ];
then
echo "$file not found" | mail -s "RetrieverB Missing File" "$email"
fi
fi
currdateis12-04-12. Your file contains the date in a different format,12-04-2012, so there’s no match.