Date comparision in Unix

Hi All,

I would need your help to compare dates in my script.

Say if I have the dates in a file I need to comapre these dates with yesterday's date and the dates which are older than yesterday needs to be displayed.

Example:

03/22/2012
03/24/2012
03/20/2012
03/21/2012
03/12/2012 --> these dates are in teh file "ldate"

I need teh dates whicha re older than yesterday ie 03/21/2012 to be displayed.

================ Here is teh script am using .....

INPUT=$1;
OUTPUT=$2;
> OUTPUT
cat $INPUT | while read ldate
do
if [[ $ldate -le `TZ=bb24 date +%Y%m%d` ]]
then
   echo $ldate
   echo $ldate_run >> $OUTPUT
 
fi
done

---> But am getting all the dates...

Please help me on this

With GNU date:

#! /bin/bash

while IFS='/' read mt dt yr
do
    yest_dt=$(date -d"-1day" +%Y%m%d)
    file_dt=${yr}${mt}${dt}
    [ $file_dt -lt $yest_dt ] && echo "${mt}/${dt}/${yr}"
done < inputfile_containing_dates