On Tue, 18 Sep 2001, cesar wrote:

> 
>  Nas.
> 
>    Eso puedes hacerlo con sed y con awk.
>    Si me dices qu� es exactamente lo que quieres hacer 
>  te monto un script.
> 
>  Un saludo.
>   C�sar
>  Insallah
> 
> Miguel Angel wrote:

Pues yo me hice un script muy sencillo.

==============8<--------(html2txt.bash)------------------------------
#!/bin/bash
TEMP0=/tmp/html2txt.txt
TEMP1=/tmp/html2txt.sed1.$$
TEMP2=/tmp/html2txt.sed2.$$
cat <<-FIN > $TEMP1
s/<\/.*>//g
FIN
cat <<-FIN > $TEMP2
s/\&aacute;/�/g
s/\&eacute;/�/g
s/\&iacute;/�/g
s/\&oacute;/�/g
s/\&uacute;/�/g
s/\&ntilde;/�/g
s/\&Ntilde;/�/g
s/<.*>//g
FIN
chmod 777  $TEMP1 $TEMP2
for i in $*
do
 sed  -f $TEMP1 $i > $TEMP0
 sed  -f $TEMP2 $TEMP0 > $i.txt
done
#rm $TEMP0 $TEMP1 $TEMP3
==============8<--------(html2txt.bash)------------------------------

Uso:

html2txt.bash fichero1.html fichero2.html .....


Un saludo

Antonio Castro

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        /\     /\      Ciberdroide Inform�tica (Tienda de Linux)
          \\W//            <<< http://www.ciberdroide.com >>>
         _|0 0|_                                                    
+-oOOO--(___o___)--OOOo----------------------------------------------------+ 
|  . . . . U U . . . . Antonio Castro Snurmacher  [EMAIL PROTECTED]  |  
|  . . . . . . . . . .                                                     | 
+()()()----------()()()----------------------------------------------------+
| *** 1.700 sitios clasificados por temas sobre Linux en ***Donde_Linux*** |
| <<< http://www.ciberdroide.com/misc/donde/dondelinux.html >>>            |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+


Responder a