X-Spam-Check-By: sourceware.org Message-ID: <449731D1.6000203@ateb.com> Date: Mon, 19 Jun 2006 19:22:57 -0400 From: Reid Thompson 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> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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/