scripting help

Does anyone knwo how to write the following script

In case I have script name as Test

Test pattern Filename will print the lines which contain the pattern for a given file name

so if I have test "oracle" a.log

I will list all the lines containg oracle in a.log file

Thanks

James

Also, if possible, can this be written in Perl as well?

It could easily be written in perl, what have you tried so far?