🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #14739

pregunta (jodida) de sed

#14739
From: Benjamín Albiñana Pérez
Date: Wed, 11 Oct 2000 00:00
42 lines
1892 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


  Nas.

  Aqu� vengo con la pregunta jodida del mes. :-)

  He encontrado esto en comp.unix.shell

  sed -e '/./{H;$!d;}' -e 'x;/cadena/!d;' fichero

  viene a ser un grep, pero que en vez de escupir las l�neas
  en donde aparece "cadena", pone los p�rrafos en donde
  aparece. Muy pr�ctico si se pudiera meter una variable en
  lugar de la cadena. 

  Yo lo �nico que s� de sed es deletrearlo, as� que he
  probado lo obvio:

  sed -e '/./{H;$!d;}' -e 'x;/$1/!d;'
  sed -e '/./{H;$!d;}' -e 'x;/"$1"/!d;'
  sed -e '/./{H;$!d;}' -e 'x;/'$1'/!d;'

  pero no hay tu t�a. �Hay un gur� del sed entre los
  asistentes? :-)

- -- 
Benjam�n Albi�ana P�rez
Linux User N�78177                         http://www.escomposlinux.org/
Clave p�blica: wget http://www.escomposlinux.org/benalb/benjamin-gpg.asc
:YPMQ: // /n./ [Usenet] Abbrev. para  "Yo Pa Mi Que".


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE55OHG633hg168lHwRAhX5AJ9qJ69tez3l83rg+ncdSA2x2SRw0ACgj5YG
dtXPmVL6HIQdPj3sDBgjfAg=
=AJgg
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn8u9oe2.unc.benjamin@lamanonegra.net.dhis.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,f8f0ce10df571fda,start
X-Google-Attributes: gidf86c8,public
From: benjamin@lamanonegra.net.dhis.org (Benjamín Albiñana Pérez)
Subject: pregunta (jodida) de sed
Date: 2000/10/11
Message-ID: <slrn8u9oe2.unc.benjamin@lamanonegra.net.dhis.org>
X-Deja-AN: 680328626
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
X-Trace: fu-berlin.de 971301477 20543324 62.83.229.51 (16 [31308])
Organization: Debian: the biggest, still the best
Mime-Version: 1.0
User-Agent: vimnus.0.0.a1 (Linux)
Reply-To: benjamin@lamanonegra.net.dhis.org
Newsgroups: es.comp.os.linux.programacion