delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <449731D1.6000203@ateb.com> |
Date: | Mon, 19 Jun 2006 19:22:57 -0400 |
From: | Reid Thompson <reid DOT thompson AT ateb DOT com> |
User-Agent: | Thunderbird 1.5.0.2 (Windows/20060308) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: loop through folders |
References: | <4945011 DOT post AT talk DOT nabble DOT com> |
In-Reply-To: | <4945011.post@talk.nabble.com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
smanna wrote: > Hello I am trying to write a script. This is the thing, I want to loop > through all folders in a certain folder and send all files in these folders > to a java program. The files are somewhere in the neighbourhood of 170.000. > the setup is: > Home > cygwin.sh program.java Folder > folder > folder ... > folder folder ... > folder folder ... > files files ... > files files ... > > help would be completely fantastic!! > -- > View this message in context: http://www.nabble.com/loop-through-folders-t1814116.html#a4945011 > Sent from the Cygwin Users forum at Nabble.com. > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > try something along the lines of for dir in `find . -type d` do for file in `ls $dir` do program.java ${dir}/$file done done -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |