Michael W.: Zählscript

Beitrag lesen

hallo,

wie könnte den in php ein zähl script aussehen wenn ich folgende datei habe (die auch nach einer auswertung enstanden ist):

USER=hossil

Processor: AMD Athlon(tm) (Thunderbird)-1041
CPU Clock Speed: 1041 MHz
Extended Memory: 127 MB (64 MB Free)
C: 19530 MB 1600 MB 17 GB RWZ Fixed Disk
USER=baciaba

Processor: Intel Celeron-941
CPU Clock Speed: 943 MHz
Extended Memory: 111 MB (64 MB Free)
C: 19530 MB 766 MB 18 GB RWZ Fixed Disk
USER=breitma

Processor: AMD Athlon(tm) (Thunderbird)-1041
CPU Clock Speed: 1041 MHz
Extended Memory: 127 MB (64 MB Free)
C: 19530 MB 911 MB 18 GB RWZ Fixed Disk
USER=christos

Processor: Intel CeleronA-364
CPU Clock Speed: 364 MHz
Extended Memory: 127 MB (64 MB Free)
C: 8040 MB 1013 MB 7027 MB RWZ Fixed Disk
USER=cottonla

Processor: AMD Athlon(tm) (Thunderbird)-1043
CPU Clock Speed: 1043 MHz
Extended Memory: 127 MB (64 MB Free)
C: 19530 MB 1191 MB 17 GB RWZ Fixed Disk
USER=duhanal

Processor: AMD Athlon(tm) (Thunderbird)-1043
CPU Clock Speed: 1043 MHz
Extended Memory: 127 MB (64 MB Free)
C: 19530 MB 755 MB 18 GB RWZ Fixed Disk

.
.
.

ich möchte jetzt das der gesamte text sortiert wird - ungefähr so:

Processoren:
Processor: AMD Athlon(tm) (Thunderbird)-1041 | 2
Processor: Intel Celeron-941                 | 1
Processor: Intel CeleronA-364                | 1
Processor: AMD Athlon(tm) (Thunderbird)-1043 | 2

CPU:
CPU Clock Speed: 1041 MHz  | 2
CPU Clock Speed: 943 MHz   | 1
CPU Clock Speed: 364 MHz   | 1
CPU Clock Speed: 1043 MHz  | 2

Extended Memory: 127 MB (64 MB Free) | 5
Extended Memory: 111 MB (64 MB Free) | 1

ist das möglich ? wenn ja wie ?

Danke