filter out certain column from a file

Hi all,

I have this file, how can i remove the ID Number and Cardholder Name from the file ?

e(Be[?25he[2Je[?4le[?1le[0me[1;24re[?3he[?3h
                                                                                                               Mon Apr 4 2005 5:12PM
                                                                                                                              Page 1
                                                                                                                               
                                                     Location Log Recall Report                                                     
                                          Sun Apr 3 2005 11:06AM to Mon Apr 4 2005 12:00AM                                          
 __________________________________________________________________________________________________________________________________ 
|                                                                                                                                  |
| Locations: 599 Parker's II 016869517              Transactions: Valid    Transaction Type: All            Reader Status: Online  |
|__________________________________________________________________________________________________________________________________|
|        |       |T|          |Reader|                   |                    |                     |M|O|O|                | Trans |
|  Date  | Time  |P| Location | Name |     ID Number     |  Cardholder Name   |       Action        |N|F|K|     Reason     |Amount |
 __________________________________________________________________________________________________________________________________ 
|04/03/05|01:43PM|1|Parker II |Park 2|000735219          |Regnier, Michael    |Credit/Debit Spending| | |Y|                |  10.00|
|04/03/05|06:01PM|1|Parker II |Park 2|000676759          |Stevenson, Aren     |Credit/Debit Spending| | |Y|                |  11.32|
|04/03/05|07:00PM|1|Parker II |Park 2|000728866          |Culbreth, Anna      |Credit/Debit Spending| | |Y|                |   4.06|
 __________________________________________________________________________________________________________________________________ 

                                                          Blackboard Inc.                                                        End

Thanks

CT

If this is the whole file and the data is on line 1:

awk ' {
             if(NR>1) 
             {
                 print $0
             }
        } ' filename > tmp
mv tmp filename

I never have a need to write such a thing and don't write anything complex in awk but here is a stab and I think it meets your requirements (they were ambiguous in my mind so you have two solutions). I am absolutly certain this is too clumsy and can be written more elegantly.

If you are trying to blank the two fields:

awk -F\| '
    NF != 15 {
        print $0
    }
    NF == 15 && $4 == "T" || $4 == "P" {
        print $0
    }
    NF==15 && $4 != "T" && $4 != "P" {
        printf ("%s%s%s\n",substr($0,1,38),"                   |                    |",substr($0,80))
    }' yourreportfile.rpt

If you want to extract the two fields:

awk -F\| '
    NF==15 && $4 != "T" && $4 != "P" {
        printf ("%s\t%s\n",$7,$8)
    }' yourreportfile.rpt

if "Credit/Debit Spending" or some other category will always be in the "Action" field ...

awk '/Debit/ || /Credit/  || /other_category/ {print $7, $8}' yourfile

I told you someone could write it more elegantly.