Article View: es.comp.os.linux.programacion
Article #18376Re: SED y caracter especial &
From: 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."
Technical Details
Message-ID:
<slrn7ts9oa.o5.javier@eb2dsn.ampr.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37DE0AF8.4AEE9FE3@fase.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f86c8,91be03d50b879594 X-Google-Attributes: gidf86c8,public From: javier@eb2dsn.ampr.org (Javier Cantero) Subject: Re: SED y caracter especial & Date: 1999/09/14 Message-ID: <slrn7ts9oa.o5.javier@eb2dsn.ampr.org> X-Deja-AN: 524967925 Distribution: es Content-Transfer-Encoding: 8bit References: <37DE0AF8.4AEE9FE3@fase.net> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: newsmanager@rediris.es X-Trace: batcher.rediris.es 937315550 22600 62.36.10.51 (14 Sep 1999 13:25:50 GMT) Organization: RedIRIS. Mime-Version: 1.0 User-Agent: slrn/0.9.5.3 (UNIX) NNTP-Posting-Date: 14 Sep 1999 13:25:50 GMT Newsgroups: es.comp.os.linux.programacion