extracting lines from a file

Hi all,

   I need to extract some lines from a file based on a condition. For ex:

My file will contain 50 lines and i need to extract line which has "File" in it and then the line which has "date" in it. Which command will be the most efficient way to do it. I have tried two ways

  1. reading the file line by line and seperating the line if the line has the filed "File"
  2. grep the file for the field "File" .
    Since i need to open around 1000 files and perform the operation , can anyone provide me the most optimal way to do it .

you can use egrep

$ egrep File | egrep date filenames