delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/19/19:11:55

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: mwoehlke <mwoehlke AT tibco DOT com>
Subject: Re: loop through folders
Date: Mon, 19 Jun 2006 18:10:59 -0500
Lines: 24
Message-ID: <e77au3$oj9$1@sea.gmane.org>
References: <4945011 DOT post AT talk DOT nabble DOT com>
Mime-Version: 1.0
User-Agent: Thunderbird 1.5.0.4 (X11/20060516)
In-Reply-To: <4945011.post@talk.nabble.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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!!

This is not a Cygwin question. However, 'find . | xargs <your program>' 
might help you. Or 'for f in find . ; do <yourprogram> $f ; done'.

'man find' and 'man bash' will get you started.

-- 
Matthew
...Ruthlessly beating Windows with a hammer until it looks like POSIX.


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019