Vi fortlaufende Zeilennummer ?

subSTYLE

Ubermutant
Hallo Leute, ich habe ein problem ..

Ich möchte einen sourcecode a la ..

Code:
<table style="border: 1px solid #333333;}" width="950" border="0" cellspacing="0" cellpadding="0"> 
 <tr> 
  <td style="border-right: 1px solid #333333;}" width="50" bgcolor="#CAAB76"></td> 
  <td width="900" bgcolor="#EBCA87"><table width="875" border="0" cellspacing="0" cellpadding="0"> 
    <tr> 
     <td valign="middle" style="border-bottom: 2px dotted #333333;}"></td> 
    </tr> 
    <tr> 
     <td><table width="900" border="0" cellspacing="0" cellpadding="0"> 
       <tr> 
        <td colspan="4"></td> 
       </tr> 
       <tr>

in soetwas umwandeln:

Code:
<table style="border: 1px solid #333333;}" width="950" border="0" cellspacing="0" cellpadding="0"> 
<tr> 
<td style="border-right: 1px solid #333333;}" width="50" bgcolor="#CAAB76"></td> 
<td width="900" bgcolor="#EBCA87"><table width="875" border="0" cellspacing="0" cellpadding="0"> 
<tr> 
<td valign="middle" style="border-bottom: 2px dotted #333333;}"></td> 
</tr> 
<tr> 
<td><table width="900" border="0" cellspacing="0" cellpadding="0"> 
<tr> 
<td colspan="4"></td> 
</tr> 
<tr>

Dazu benutze ich folgenden Syntax .. :%s/^ *//g

Wie zum teufel bekomme ich aber Foltlaufende Zeilennummern vor die Zeilen, also in etwa so:

Code:
Zeile1=<table style="border: 1px solid #333333;}" width="950" border="0" cellspacing="0" cellpadding="0"> 
Zeile2=<tr> 
Zeile3=<td style="border-right: 1px solid #333333;}" width="50" bgcolor="#CAAB76"></td> 
Zeile4=<td width="900" bgcolor="#EBCA87"><table width="875" border="0" cellspacing="0" cellpadding="0"> 
.......
Zeile105=<tr> 
Zeile106=<td valign="middle" style="border-bottom: 2px dotted #333333;}"></td> 
Zeile107=</tr> 
Zeile108=<tr> 
.......
Zeile999=<tr>

THX subby !!
 

m00h

Gebannt
Code:
nl -ba -fa -ha -nln -p -s= -w1 alteDatei | sed 's/^/Zeile/' >neueDatei
nl ist Bestandteil der coreutils.
 
Top