Article View: es.comp.os.linux.programacion
Article #1218Re: BASH SCRIPT
From: AnimAlf
Date: Sat, 25 Feb 2006 13:15
Date: Sat, 25 Feb 2006 13:15
30 lines
1839 bytes
1839 bytes
El ds 25 de 02 del 2006 a les 11:42 +0100, en/na Olaf El Blanco va escriure: > Quiero que mientras haya parametros, haga una determinada cosa. > > #!/bin/bash > # La variable i es el primer parametros > i=1; > #mientras las variables $1 $2 $3 tengan valores, que se ejecute el bucle. > while $i > do > echo -e "Posicion $i\n" > let i++ > done if [ $# -eq 0 ]; then echo "Necesito más!!"; exit -1; fi; for i in $(seq 1 $#) do echo -e "en la posicion $i: $1"; shift; done -- AnimAlf AnimAlf@engendro.sytes.net http://www.fut.es/~acl/AnimAlf Personal Experimental WebServer: http://www.engendro.sytes.net LiNUX ReGiSteRED UseR #91326 PublicPGPkeyID 0xB3B41215 Is the truth out there? Coalición europea contra el correo comercial no solicitado: http://www.euro.cauce.org/es
Technical Details
Message-ID:
<1140873151.11153.0.camel@general.engendro.sytes.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!nsnmpen1-lo.nuria.telefonica-data.net!telenews.teleline.es!not-for-mailReferences:
<dtpci8$8u6$1@cormoran.emeteo.local>Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,53d0de41776743f9 X-Google-Attributes: gidf86c8,public X-Google-Language: SPANISH,UTF8 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!nsnmpen1-lo.nuria.telefonica-data.net!telenews.teleline.es!not-for-mail X-Trace-PostClient-IP: 80.32.76.249 Newsgroups: es.comp.os.linux.programacion Subject: Re: BASH SCRIPT From: AnimAlf <AnimAlf@engendro.sytes.net> In-Reply-To: <dtpci8$8u6$1@cormoran.emeteo.local> References: <dtpci8$8u6$1@cormoran.emeteo.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Organization: Is the truth out there? Message-ID: <1140873151.11153.0.camel@general.engendro.sytes.net> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 Lines: 31 Date: Sat, 25 Feb 2006 13:15:06 GMT NNTP-Posting-Host: 10.20.31.4 X-Complaints-To: usenet@teleline.es X-Trace: telenews.teleline.es 1140873306 10.20.31.4 (Sat, 25 Feb 2006 14:15:06 MET) NNTP-Posting-Date: Sat, 25 Feb 2006 14:15:06 MET