🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: duda con script de bash

#7770
From: marmolejo
Date: Wed, 29 Jan 2003 00:38
44 lines
2786 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

En Fecha Tue, 28 Jan 2003 17:33:46 +0100 Esteban Navarro
<scandisk@able.es> escribi�:


>>  Y si suponemos que el fichero "entrada.txt" tiene lo siguiente:
>>         pepe:123adee111
>>         ana:2wdueu222
>>         manolo:238982js
> 
>> �Tambien me servira para borrar la linea entera?
>> Es decir, que yo le paso el nombre del usuario (pepe, ana, etc) a
>borrar y> me elimina toda la linea.
> 
>Tambi�n si no quieres borrar toda la linea puedes usar cut:
>
>grep -v pepe fichero | cut -c 6-14 > fichero2

Aparte de lo comentado con grep en el mensaje de catactttc ;), �no ser�a
m�s f�cil para borrar s�lo el nombre meterle en lugar de g/paco/d al
script una substituci�n por la cadena vac�a?:

s/^paco//

igual as� borrar�a la primera aparici�n de paco como primera palabra
de l�nea en el archivo

- -- 
Windows 98 no se cuelg� AMIBIOS v2.8. 65535Kb OK. Iniciando Windows
98...

  - Debian GNU/Linux Sid                 Linux User #162799 - 
   -  PGP Pub Key en pgp.escomposlinux.org ID:0x320A57C2   -
  - marmolejo at escomposlinux dot es         ICQ: 65833679 -

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+NyJtal36lDIKV8IRAvZSAJ4iS0lRnfb+rBBnGX7SijbWAK5vPQCggYkk
IgFUK2Rs5ytWdB1DujF/FS4=
=aazz
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <20030129013806.67ad0c5e.marmolejo@escomposlinux.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!195.40.4.120.MISMATCH!easynet-quince!easynet.net!news-hub.cableinet.net!blueyonder!marmolejo.escomposlinux.org!not-for-mail
References: <3E32BC97.BE023DEF@menta.net> <slrnb36b0t.hg.arbeizaf@jupiter.olimpo> <slrnb3appd.bch.marmolejo@porta.til> <3E36949B.8F1ECC6C@menta.net> <b16bca$t0u7k$1@ID-158006.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,8fbbda953043e037
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-01-28 16:38:08 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!195.40.4.120.MISMATCH!easynet-quince!easynet.net!news-hub.cableinet.net!blueyonder!marmolejo.escomposlinux.org!not-for-mail
From: marmolejo <marmolejo@escomposlinux.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: duda con script de bash
Date: Wed, 29 Jan 2003 01:38:06 +0100
Organization: Ecolnet
Lines: 44
Message-ID: <20030129013806.67ad0c5e.marmolejo@escomposlinux.org>
References: <3E32BC97.BE023DEF@menta.net>
 <slrnb36b0t.hg.arbeizaf@jupiter.olimpo>
 <slrnb3appd.bch.marmolejo@porta.til>
 <3E36949B.8F1ECC6C@menta.net>
 <b16bca$t0u7k$1@ID-158006.news.dfncis.de>
NNTP-Posting-Host: localhost.escomposlinux.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: localhost.escomposlinux.org 1043800687 21416 127.0.0.1 (29 Jan 2003 00:38:07 GMT)
X-Complaints-To: newsmaster@marmolejo.escomposlinux.org
NNTP-Posting-Date: Wed, 29 Jan 2003 00:38:07 +0000 (UTC)
X-Newsreader: Sylpheed version 0.8.5claws126 (GTK+ 1.2.10; )