Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash if file exists



 On Thu, 2008-04-03 at 18:55 -0400, Derek Martin wrote: 
> Which can be further simplified to: 
> 
> if ls *.zip >/dev/null 2>&1; then 
>   echo yes 
> else 
>   echo no 
> fi 

Depending on the number of zip files, you could run afoul of having too 
long a command line from the "ls *.zip".  I believe that using "echo" 
instead, would not have such a problem.  (Corrections welcome) 

-- 
A: Because it messes up the order in which people normally read text. 
> Q: Why is top-posting such a bad thing? 
>> A: Top-posting.         
>>> Q: What is the most annoying thing on Usenet and in e-mail? 

Cole Tuininga 
[hidden email] 
http://www.code-energy.com/



-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 

_______________________________________________ 
Discuss mailing list 
[hidden email] 
http://lists.blu.org/mailman/listinfo/discuss
 


BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org