🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ayuda con script...

#7157
From: AmokK
Date: Wed, 02 Apr 2003 21:15
46 lines
2098 bytes
Muchas Gracias!"!!!!!!!!!!!!!!

AmokK.-


On Wed, 02 Apr 2003 19:11:08 +0000, juanma wrote:

> Hola, eso puedes hacerlo con test -f:
> 
> 	if test -f /ruta/* ; then
> 		# lo que sea cuando hay ficheros
> 	else
> 		# lo que sea cuando no hay ficheros
> 	fi
> 
> man test :).
> 
> Un saludo
> 
> 
> In article <pan.2003.04.02.18.35.28.658710@terra.com>, AmokK wrote:
>> Eso.,...
>> 
>> necesito hacer un ls a un directorio y que la salida del ls me la mande a
>> una variable.. en la que me indique si el directorio tiene o no archivos
>> dentro... para despues hacer una comparacion con el valor de esa
>> variable...
>> 
>> en definitiva que la variable me guarde la informacion de si hay o no
>> archivos en el directorio...
>> 
>> creo que el valor de la variable podr�a ser 0 o 1.  0 para si y 1 para no.
>> 
>> Cualquier ayuda... es bienvenida....
>> 
>> Gracias...
>> 
>> AmokK.-
>> 
>> 
>> 
>> 
>>

-- 
gpg: processing message failed: eof
Technical Details
Message-ID: <pan.2003.04.02.21.15.51.636991@terra.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-peer.gip.net!news.gsl.net!gip.net!news-santiago!dnewserver.firstcom.cl
References: <pan.2003.04.02.18.35.28.658710@terra.com> <b6fckc$4n5in$1@ID-184714.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,6351b339ff6842aa
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-04-02 13:23:17 PST
From: "AmokK" <amokk@terra.com>
Subject: Re: ayuda con script...
Date: Wed, 02 Apr 2003 17:15:52 -0400
User-Agent: Pan/0.13.4 (She had eyes like strange sins. (Debian GNU/Linux))
Message-ID: <pan.2003.04.02.21.15.51.636991@terra.com>
Newsgroups: es.comp.os.linux.programacion
References: <pan.2003.04.02.18.35.28.658710@terra.com> <b6fckc$4n5in$1@ID-184714.news.dfncis.de>
To: juanma <juanmasg@arrakis.es>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 163.247.46.210
X-Original-NNTP-Posting-Host: 163.247.46.210
X-Trace: dnewserver.firstcom.cl 1049318336 163.247.46.210 (2 Apr 2003 17:18:56 -0400)
X-Original-Trace: 2 Apr 2003 17:18:56 -0400, 163.247.46.210
Lines: 47
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-peer.gip.net!news.gsl.net!gip.net!news-santiago!dnewserver.firstcom.cl