06-26-2005
66,
0
Join Date: Jun 2005
Last Activity: 20 May 2010, 9:13 AM EDT
Posts: 66
Thanks Given: 1
Thanked 0 Times in 0 Posts
Script help
Hi there,
I have a file where the records are like :
Delta/7248/S-T-TF-/O-D-DO-
Virgin/657/SM-W-FS/DO-O-DO
Lufthansa/105/SMTW-FS/OODO-DO
Virgin/212/---WT-S/---OO-D
PanAm/411/SM-W-FS/OD-O-DD
The first field is the company name, the second the flight number, the third the days (S-Sunday, M-Monday etc) and in the last field if the flight arrived Ontime (O) or there was a delay (D).
What I want is to get for each company, not for each flight, the total of the flights that arrived on time and with delay. I am imagining the output sth like:
Virgin Flights on time: 17 Delayed: 22
Lufthansa Flights on time: 12 Delayed: 13
Can somebody help please. Actually I have sth in mind but I don't know how to count each O and D.