[glux] [HELP] manipolazione testo+allegato!

fabrizio frompani@rompani.it
Ven 18 Gen 2008 12:28:17 CET


ciao 
nel testo in allegato vorrei fare le seguenti operazioni:
-1-tolgliere tutti i tag html ovvero :

ID=17000000F4FCC228 channel=0
TEMP
1.3125 C.
--
ID=AA0000010F1B6D28 channel=0
TEMP
9.0 C.
--
ID=8700000026265C05 channel=0
OUTPUT
ON
--
ID=16000000262C1F05 channel=0
OUTPUT
OFF
*****
2007-12-18 23:45:04
*****

2- togliere la prima riga di ***** 
3- la seconda riga di ***** deve diventare un separatore di record (il
testo allegato è solo una parte , vi sono molti "record" simili)
4 ciascuna riga della porzione sopra deve diventare un campo.
5 i campi cosi creati sono separati da ;

quinsi il risultato finale per il primo record sarebbe:


ID=17000000F4FCC228 channel=0;TEMP;1.3125C.;--;ID=AA0000010F1B6D28 channel=0;TEMP;9.0C.;--;ID=8700000026265C05 channel=0;OUTPUT;ON;--;ID=16000000262C1F05 channel=0;OUTPUT;OFF;2007-12-1823:45:04



ho provato come inizio con awk a fargli considerare ogni LF+CR  come un
separatore di campo ,con questo comando 
awk 'BEGIN { FS = "/n/r" } {print $1} ' T.txt >t

 ma non riesco ad ottenere cio che vorrei :-|
qualcuno è protico di questo tipo di manipolazioni ed ha voglia di
aiutarmi? 
ciao
gr
f

-------------- parte successiva --------------
ID=17000000F4FCC228 channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
1.3125 C.
--
ID=AA0000010F1B6D28&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
9.0 C.
--
ID=8700000026265C05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#FF0000"><B>ON</B></font>
--
ID=16000000262C1F05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
*****
2007-12-18 23:45:04
*****
ID=17000000F4FCC228&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
1.1875 C.
--
ID=AA0000010F1B6D28&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
8.875 C.
--
ID=8700000026265C05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#FF0000"><B>ON</B></font>
--
ID=16000000262C1F05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
*****
2007-12-18 23:50:04
*****
ID=17000000F4FCC228&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
1.1875 C.
--
ID=AA0000010F1B6D28&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
8.8125 C.
--
ID=8700000026265C05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#FF0000"><B>ON</B></font>
--
ID=16000000262C1F05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
*****
2007-12-18 23:55:04
*****
ID=17000000F4FCC228&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
1.125 C.
--
ID=AA0000010F1B6D28&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
8.4375 C.
--
ID=8700000026265C05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
--
ID=16000000262C1F05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
*****
2007-12-19 00:00:04
*****
ID=17000000F4FCC228&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
1.1875 C.
--
ID=AA0000010F1B6D28&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
7.0625 C.
--
ID=8700000026265C05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
--
ID=16000000262C1F05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
*****
2007-12-19 00:05:04
*****
ID=17000000F4FCC228&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
1.1875 C.
--
ID=AA0000010F1B6D28&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
5.75 C.
--
ID=8700000026265C05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
--
ID=16000000262C1F05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
*****
2007-12-19 00:10:04
*****
ID=17000000F4FCC228&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
1.1875 C.
--
ID=AA0000010F1B6D28&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
4.875 C.
--
ID=8700000026265C05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
--
ID=16000000262C1F05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
*****
2007-12-19 00:15:04
*****
ID=17000000F4FCC228&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
1.125 C.
--
ID=AA0000010F1B6D28&nbsp;channel=0
</td>
<td >TEMP</td>
 <td align="center" colspan="2" valign="absmiddle" bgcolor="#ADD8E6">
4.1875 C.
--
ID=8700000026265C05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
--
ID=16000000262C1F05&nbsp;channel=0
</td>
<td >OUTPUT</td>
<td bgcolor="#ADD8E6">
<font color="#005500">OFF</font>
*****
2007-12-19 00:20:04



Maggiori informazioni sulla lista glux