Article View: es.comp.os.linux.programacion
Article #15090Re: Leer líneas de un fichero
From: Manuel Constantino
Date: Thu, 17 Aug 2000 00:00
Date: Thu, 17 Aug 2000 00:00
22 lines
1330 bytes
1330 bytes
Para leer lineas de un fichero yo uso sed.
sed -n N�DE_LINEAp NOMBRE_DEL_FICHERO
Por ejemplo:
sed -n 15p /etc/profile
...leer�a la linea 15 de /etc/profile y la sacar�a por pantalla. Si la
quisieras introducir en una variable entonces:
NOMBRE_VARIABLE="$(sed -n 15p /etc/profile)"
Saludos...
--
Manuel Constantino
Email: La primera letra de mi nombre seguida de mi apellido @ worldonline.es,
todo en min�sculas.
AVISO: SE DENUNCIARA AL ADMINISTRADOR PERTINENTE CUALQUIER ENVIO DE SPAM
Technical Details
Message-ID:
<slrn8poa4h.vm.spammer.bueno@linux.manolosoft.es>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39999EE1.BFBF9AE4@omgs.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,1acfdd076705ea7c X-Google-Attributes: gidf86c8,public From: spammer.bueno@el.spammer.muerto.es (Manuel Constantino) Subject: Re: Leer líneas de un fichero Date: 2000/08/17 Message-ID: <slrn8poa4h.vm.spammer.bueno@linux.manolosoft.es> X-Deja-AN: 659529383 Content-Transfer-Encoding: 8bit References: <39999EE1.BFBF9AE4@omgs.es> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: news@linux.manolosoft.es X-Trace: linux.manolosoft.es 966535313 1015 127.0.0.1 (17 Aug 2000 18:01:53 GMT) Organization: ManoloSoft Mime-Version: 1.0 User-Agent: slrn/0.9.5.4 (UNIX) Reply-To: spammer.bueno@el.spammer.muerto.es NNTP-Posting-Date: 17 Aug 2000 18:01:53 GMT Newsgroups: es.comp.os.linux.programacion