read file backwards

Assume file1 contains a list of strings.
My first script is scanning the file and deals with the lines with a certain patern in it:

grep 'somepatern' file1 \
while read LINE ; do
doSomethingAboutIt
done

Now, I need a second script that deals with the same lines (& do something differently) but in the opposite order; the last line found in the file with that patern shuld be handled first.

Please help me. Thanks so much!!!

You could generate a file with all the lines reversed by using something like

cat </dev/null >output
while read N
do
     echo "$N" >output.tmp
     cat output >>output.tmp
     mv output.tmp output
done

Hey, there's a new approach. For some other solutions see: sort a file in reverse order

Thanks you so much, Porter & Perderabo!!
Yes, this will do (& is cute too;-)
tail -r file1