parsing a text file into columns and rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

i have a text file as shown below, which contains records like varaiable, value pairs seperated by '=' .there are many such records, each record is starts with first variable 'SUBSTRATNAME'.
SUBSTRATNAME=S112 <--
PIXEL=5
OPERATOR=Zi
KOMMENTAR=dunkel
DATUM=03.01.2005
UHRZEIT=11:22
MESSUNG=SWEEP_UI
I_SC=-57.3496E-12
V_OC=1.0103E+0
FF=-1.3303E+0
WIRKUNGSGRAD=14.4220E-9
SUBSTRATNAME=E07 <--
PIXEL=1
OPERATOR=MN
KOMMENTAR=Au/PEDOTCPP105D/Au
DATUM=03.01.2005
UHRZEIT=11:52
MESSUNG=SWEEP_UI
I_SC=-50.4506E-12
V_OC=1.0103E+0
FF=-1.5353E+0
WIRKUNGSGRAD=14.6421E-9
SUBSTRATNAME=E07 <--
PIXEL=1
OPERATOR=Zi
KOMMENTAR=Au/PEDOTCPP105D/Au
DATUM=03.01.2005
UHRZEIT=11:54
MESSUNG=SWEEP_UI
I_SC=NaN
V_OC=0.0000E+0
FF=NaN
WIRKUNGSGRAD=NaN

i want to parse this file as shown below each column shud be seperated by tab space or comma.

SUBSTRATNAME  PIXEL OPERATOR KOMMENTAR...................................WIRKUNGSGRAD
s112                     5      zi                dunkel                                               14.4220E-9

likes this i want all the values.

thanks for help


 

		
---------------------------------
Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux