Thread View: es.comp.os.linux.programacion
3 messages
3 total messages
Started by Félix Anadón
Tue, 14 Sep 1999 00:00
SED y caracter especial &
Author: Félix Anadón
Date: Tue, 14 Sep 1999 00:00
Date: Tue, 14 Sep 1999 00:00
24 lines
1055 bytes
1055 bytes
Tengo un proble con la orden sed. quiero sustituir todos los s�mbolos menor que (<) por su equivalente en html (<) de forma que utilizo (sed s/\</<\;/g) pero no funciona porque & es un s�mbolo especial para sed y no se como escaparlo. (sed s/\</\<\;/g) tampoco funciona. Gracias por leerme y por responderme -- Saludos, _______________________ F�lix Anad�n Responsable de Inform�tica FASE, SL http://www.fase.net _______________________
Re: SED y caracter especial &
Author: Javier Cantero
Date: Tue, 14 Sep 1999 00:00
Date: Tue, 14 Sep 1999 00:00
31 lines
1671 bytes
1671 bytes
In article <37DE0AF8.4AEE9FE3@fase.net>, F�lix Anad�n wrote:
>Tengo un proble con la orden sed.
>
>quiero sustituir todos los s�mbolos menor que (<) por su equivalente en
>html (<)
>
>de forma que utilizo (sed s/\</<\;/g)
>
>pero no funciona porque & es un s�mbolo especial para sed y no se como
>escaparlo.
Mmmmmmm....
$ info sed
" Also, the REPLACEMENT can contain unescaped `&' characters which will
reference the whole matched portion of the pattern space. To include a
literal `\', `&', or newline in the final replacement, be sure to precede
the desired `\', `&', or newline in the REPLACEMENT with a `\'. "
>(sed s/\</\<\;/g)
>tampoco funciona.
Deber�a. Prueba con sed 's/\</\<\;/g' (rodeando todo con comillas
simples).
Saludos de Javier (jcantero @ jet.es)
----
"La Comunidad Linux ayuda a los que se ayudan a s� mismos."
Re: SED y caracter especial &
Author: Antonio Villalon
Date: Sat, 18 Sep 1999 00:00
Date: Sat, 18 Sep 1999 00:00
22 lines
1612 bytes
1612 bytes
=?iso-8859-1?Q?F=E9lix=20Anad=F3n?= (fase@fase.net) wrote: : quiero sustituir todos los s�mbolos menor que (<) por su equivalente en : html (<) Holas, Para trabajar con ficheros .tex y sustituir los "&" de un texto por los "\&" de TeX, con sed utilizo cat fichero.txt |sed 's/&/\\&/g' >fichero.tex Espero que te sirva de ayuda, supongo que con esa secuencia podras escapar los "&". Saludos, Toni -- ############################################################################# # Toni Villalon <toni@aiind.upv.es> # # TELNET andercheran.aiind.upv.es 2895 for PGP Public Key # ############################################################################# # 'When you say "I wrote a program that crashed Windows", people just stare # # at you blankly and say "Hey, I got those with the system, *for free*".' # # Linus Torvalds # ############# This .signature is written in 100% recycled bytes #############
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads