🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Instruccion IF en BASH

#6612
From: Mario Teijeiro Otero
Date: Mon, 09 Jun 2003 17:03
35 lines
1803 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bypper escrib�o:

> Sabeis como seria la instruccion IF de BASH con AND?
> 
> me canta error de todas, todas :-(
> 
> if [ $VARIABLE -eq 4 and $VARIABLE -eq 1 ]; then
> loquesea
> fi
> 
> y he probado otras variantes pero nada
> 
Es con -a
quedar�a:

if [ $VARIABLE -eq 4 -a $VARIABLE -eq 2 ]; then
        loquesea
fi

Claro est� que una variable no puede ser igual a 4 y a 2 a la vez;-)

saludos
- -- 
WIN95 Muy pronto disponible tambi�n para Megadrive y Super Nintendo.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+5L3gMKsc+XeZcdwRAu85AKCK9M3HHV43N6WPThn6HdKQkbD6gwCdHU7W
i+dTI6sJsy4643An6U5c63c=
=Na4j
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <bc2eo4$ac4$1@cernicalo.emeteo.local>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!fu-berlin.de!news.eteo.mondragon.edu!antonio.escomposlinux.org!cernicalo.escomposlinux.org!not-for-mail
References: <20030606182107.3a4e80f9.bypper@tomate.fadlan.com>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,a4f2f52955aaa8ff
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-06-09 10:05:11 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!fu-berlin.de!news.eteo.mondragon.edu!antonio.escomposlinux.org!cernicalo.escomposlinux.org!not-for-mail
From: Mario Teijeiro Otero <emeteo@escomposlinux.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Instruccion IF en BASH
Date: Mon, 09 Jun 2003 19:03:22 +0200
Organization: Ecolnet
Lines: 35
Message-ID: <bc2eo4$ac4$1@cernicalo.emeteo.local>
References: <20030606182107.3a4e80f9.bypper@tomate.fadlan.com>
NNTP-Posting-Host: localhost.localdomain
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8Bit
X-Trace: cernicalo.emeteo.local 1055178308 10628 127.0.0.1 (9 Jun 2003 17:05:08 GMT)
X-Complaints-To: emeteo@escomposlinux.org
NNTP-Posting-Date: Mon, 9 Jun 2003 17:05:08 +0000 (UTC)
User-Agent: KNode/0.7.2