Article View: es.comp.os.linux.programacion
Article #7491Re: Duda tonta de un script
From: Fernando Arbeiza
Date: Thu, 27 Feb 2003 13:12
Date: Thu, 27 Feb 2003 13:12
31 lines
1806 bytes
1806 bytes
Hola:
Bien, en la asignaci�n de variables no debes dejar espacio, pero en la
comprobaci�n de condiciones s�.
Adem�s, tal y como est�, nunca se sumar� uno al contador, porque dentro
del while contador siempre ser� distinto de fin, y estar�s en un bucle
infinito.
On Thu, 27 Feb 2003 13:57:07 +0100, cyfuss <notengo@terra.es> wrote:
> #!/bin/bash
>
> CONTADOR=0
> FIN=2
while [ $CONTADOR != $FIN ]; do
> echo fetchnews -vvvv
> echo hola
>
> echo sumamos uno al contador
> let CONTADOR=CONTADOR+1
> done
Lee la p�gina del manual de test (que, en definitiva es el [ de las
condiciones):
man test
A ver ahora.
--
Fernando Arbeiza <URL: mailto:arbeizaf@ono.com>
Crea tu propio Linux: <URL: http://www.escomposlinux.org/lfs-es>
Technical Details
Message-ID:
<slrnb5s3lo.sse.arbeizaf@jupiter.olimpo>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!81-203-248-140.user.ono.COM!not-for-mailReferences:
<giuk3b.l35.ln@cyfuss> <slrnb5rvlj.ljg.arbeizaf@jupiter.olimpo> <5v1l3b.dta.ln@cyfuss>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,636565e833d291ef X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2003-02-27 05:26:39 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!81-203-248-140.user.ono.COM!not-for-mail From: Fernando Arbeiza <arbeizaf@ono.com> Newsgroups: es.comp.os.linux.programacion Subject: Re: Duda tonta de un script Date: Thu, 27 Feb 2003 14:12:24 +0100 Lines: 31 Message-ID: <slrnb5s3lo.sse.arbeizaf@jupiter.olimpo> References: <giuk3b.l35.ln@cyfuss> <slrnb5rvlj.ljg.arbeizaf@jupiter.olimpo> <5v1l3b.dta.ln@cyfuss> NNTP-Posting-Host: 81-203-248-140.user.ono.com (81.203.248.140) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 1046352397 59030203 81.203.248.140 (16 [148301]) X-Orig-Path: jupiter.olimpo!news User-Agent: slrn/0.9.7.4 (Linux)