Article View: es.comp.os.linux.programacion
Article #16381Re: Script para borrar texto
From: Esteban
Date: Wed, 26 Apr 2000 00:00
Date: Wed, 26 Apr 2000 00:00
46 lines
1769 bytes
1769 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Mart�nez <dmartin@NOSPAM.inicia.es> escribi�:
>> �C�mo puedo hacer para quitar la expresi�n "mail=" del fichero "result" y que
>> solo quede la direcci�n de correo.
>> Ejemplo:
>> grep mail= mbox > result
>>
>> mail=pepito@es
>> mail=juan@es
>> mail=victor@com
>> ...... 1400 m�s
>Puedes usar sed o awk, para estas cosas son c�modos:
>grep mail=mbox | sed -e 's/mail=//g' > result
>Quiz�s me falte o me sobre alguna letra :)
>con awk ser�a algo como:
>grep mail=mbox | awk 'BEGIN{FS="=";}{print $2;}' > result
Eso era lo que buscaba, gracias.
Con: grep mail=mbox | sed -e 's/mail=//g' >> result
^^
Funciona perfecto.
- --
Esteban Navarro (User Linux 132409)
Fondos Escritorio: http://www.ctv.es/USERS/scandisk
Clave P�blica E-Mail asunto: PGPKEY
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE5Bvo7a3aqF90Ua+oRAiLOAJ0cb+gxsosS5EcD7Ezlfif4if8qxQCgihZP
zvuiI3dNjLhGPrK6ppPM1Uo=
=heYi
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<slrn8gduht.kc.scandisk@localhost.localdomain>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<slrn8gc3gr.1uq.scandisk@localhost.localdomain> <3906A0DF.F1BBE9A7@NOSPAM.inicia.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,99dd52c8b846d8df X-Google-Attributes: gidf86c8,public From: scandisk@ctv.es (Esteban) Subject: Re: Script para borrar texto Date: 2000/04/26 Message-ID: <slrn8gduht.kc.scandisk@localhost.localdomain> X-Deja-AN: 615916640 Content-Transfer-Encoding: 8bit References: <slrn8gc3gr.1uq.scandisk@localhost.localdomain> <3906A0DF.F1BBE9A7@NOSPAM.inicia.es> Content-Type: text/plain; charset=iso-8859-1 Organization: Yo Mismo Mime-Version: 1.0 User-Agent: slrn/0.9.6.2 (Linux) Reply-To: scandisk@ctv.es Newsgroups: es.comp.os.linux.programacion