🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Aritmetica en bash (comparando tamaños de archivos)

#6989
From: Mainake
Date: Fri, 18 Apr 2003 14:51
33 lines
1997 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

El Fri, 18 Apr 2003 16:07:37 +0200, CountZero 
 expon�a en su mensaje:
> Aqu� pego el pedazo de c�digo que uso para mis intentos:
> 
>  A=`cat archivo | wc -c | awk '{ print $1; }'`
>  LIMITE=6000
>  echo "Archivo: $A"
>  echo "Limite: $LIMITE"
>  if [ $A > $LIMITE ]; then
>  	echo "Limite excedido"
>  else
>  	echo "Limite ok"
>  fi
> 
A mi me funciona si cambio la linea del if por esta

 if (( "$A" > "$LIMITE" )); then

- -- 
Mainake <mainake@escomposlinux.org>		    
Debian 3.0 (Woody) --- Usuario Linux registrado n�: 90215
PGP Pub Key en pgp.escomposlinux.org ID:0x68EB97FD

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

iD8DBQE+oBD1wanSomjrl/0RAnoYAJ9tmhV7J96NmhJZQkXJS4swT941EQCcCf8I
gh0GXaXTdq5cId9knqpGS5w=
=PwHd
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrnba047j.o6.mainake@atolon.linux.es>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!peernews-us.colt.net!newsfeed.news2me.com!news-xfer.cox.net!mainake.escomposlinux.org!not-for-mail
References: <b7p0r8$37eii$1@ID-131244.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,41ea3b247ba1e54d
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-04-18 07:51:36 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!peernews-us.colt.net!newsfeed.news2me.com!news-xfer.cox.net!mainake.escomposlinux.org!not-for-mail
From: Mainake <mainake@escomposlinux.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Aritmetica en bash (comparando tamaños de
 archivos)
Date: Fri, 18 Apr 2003 14:51:33 +0000 (UTC)
Organization: Ecolnet
Lines: 33
Message-ID: <slrnba047j.o6.mainake@atolon.linux.es>
References: <b7p0r8$37eii$1@ID-131244.news.dfncis.de>
Reply-To: mainake@escomposlinux.org
NNTP-Posting-Host: atolon.linux.es
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: rantanplan.linux.es 1050677493 7888 192.168.66.1 (18 Apr 2003 14:51:33 GMT)
X-Complaints-To: usenet@mainake.escomposlinux.org
NNTP-Posting-Date: Fri, 18 Apr 2003 14:51:33 +0000 (UTC)
User-Agent: slrn/0.9.7.4 (Linux)