🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Preguntilla de sed

#7151
From: J.A. Gutierrez
Date: Wed, 02 Apr 2003 19:23
27 lines
2077 bytes
Angel Ivan Castell Rovira <al004140@alumail.uji.es> wrote:
: Angel Ivan Castell Rovira <al004140@alumail.uji.es> wrote:
: count = 0
: for i in $(cat fichero) do{

		eso no es muy eficiente ni correcto.

		mejor:

		while read line
		do
			cosas "$line"
		done < fichero

: para que i contenga 1 linea del fichero cada iteraci�n del bucle
: y no 1 �nica palabra, sustituye la linea del "for" por la siquiente:

: for i in $(cat fichero | sed "s/  */#/g")

	read


-- 
finger spd@shiva.cps.unizar.es for PGP      /
.mailcap tip of the day:                   /             La vida es una carcel
application/ms-tnef; cat '%s' > /dev/null /           con las puertas abiertas
text/x-vcard; cat '%s' > /dev/null       /            (A. Calamaro)
Technical Details
Message-ID: <b6fdau$ir4$2@localhost.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!kibo.news.demon.net!demon!btnet-peer0!btnet-peer!btnet!news-hub.cableinet.net!blueyonder!marmolejo.escomposlinux.org!not-for-mail
References: <1b5b7a1f.0303310242.b117c5@posting.google.com> <b6bfkb$7gh$2@sofora01.uji.es> <b6bg3u$7gh$3@sofora01.uji.es>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,d868d3e9f4413baf
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-04-02 11:23:13 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!kibo.news.demon.net!demon!btnet-peer0!btnet-peer!btnet!news-hub.cableinet.net!blueyonder!marmolejo.escomposlinux.org!not-for-mail
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Preguntilla de sed
Date: Wed, 2 Apr 2003 19:23:11 +0000 (UTC)
Organization: Rank
Lines: 27
Sender: "J.A. Gutierrez" <spd@shiva.cps.unizar.es>
Message-ID: <b6fdau$ir4$2@localhost.escomposlinux.org>
References: <1b5b7a1f.0303310242.b117c5@posting.google.com> <b6bfkb$7gh$2@sofora01.uji.es> <b6bg3u$7gh$3@sofora01.uji.es>
NNTP-Posting-Host: shiva.cps.unizar.es
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: localhost.escomposlinux.org 1049311391 19300 155.210.152.10 (2 Apr 2003 19:23:11 GMT)
X-Complaints-To: newsmaster@marmolejo.escomposlinux.org
NNTP-Posting-Date: Wed, 2 Apr 2003 19:23:11 +0000 (UTC)
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (IRIX64/6.2 (IP19))