Article View: es.comp.os.linux.programacion
Article #12081Re: Duda Shell scripting (bash)
From: Mario Teijeiro Otero
Date: Sun, 02 Sep 2001 22:40
Date: Sun, 02 Sep 2001 22:40
39 lines
1976 bytes
1976 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Artabros wrote: > El�gran�problema�q�me�encuentro�en�las�dos�es�"como�descarto > las lineas ya leidas?". Supongo q simplemente borrandolas del fichero > en el 1� caso y guardando en una variable en q linea va para el 2�. > Son esas las soluciones mas viables? con cat fichero| sed -ne 'xp' lees la l�nea n�mero x, Es dicir en un fichero script pones #!/bin/sh |sed -ne '$1p' y lo lanzas como pepito@caliente $ cat fichero |./imprimerlinea 10 eso imprimir� la l�nea 10 del fichero. Saludos - -- "Yo uso software libre" (declaraci�n a petici�n de Richard M. Stallman) Mario Teijeiro Otero (emeteo) mailto: mteijeiro at escomposlinux dot org clave: correo con Asunto: "[PGPKEY]" Usr. Reg. 122438 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7krVvMKsc+XeZcdwRAiMUAKCB709UbwVCgqyGiDk+HQpvxzEiowCfZa2S nPs6xB8fCt8IaFHsqH7PQuI= =T/wq -----END PGP SIGNATURE-----
Technical Details
Message-ID:
<ihcum9.721.ln@asimovi.localdomain>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!news.mad.ttd.net!asimovi.localdomain!nobodyReferences:
<f6r2pts6p82l1tpjnfj2dte39hkoh6bjkp@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,8233a2292fd245b9 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-09-03 06:03:28 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!news.mad.ttd.net!asimovi.localdomain!nobody From: Mario Teijeiro Otero <mteijeiro@escomposlinux.org> Newsgroups: es.comp.os.linux.programacion Subject: Re: Duda Shell scripting (bash) Date: Mon, 03 Sep 2001 00:40:50 +0200 Organization: Telefonica Transmision de Datos Lines: 40 Message-ID: <ihcum9.721.ln@asimovi.localdomain> References: <f6r2pts6p82l1tpjnfj2dte39hkoh6bjkp@4ax.com> NNTP-Posting-Host: 193-152-67-229.uc.nombres.ttd.es Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit User-Agent: KNode/0.7.0