This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: CYGWIN file structure


Hi Eric,

the ls is superfluos, because a unix shell already expands wildcards
(globbing):

for IMG_FILE in image*.tif; do

Bye, Heribert (heribert_dahms@icon-gmbh.de)

> -----Original Message-----
> From:	Eric M. Monsler [SMTP:emonsler@beamreachnetworks.com]
> Sent:	Wednesday, April 25, 2001 02:57
> To:	James Bergstrom
> Cc:	cygwin@sources.redhat.com
> Subject:	Re: CYGWIN file structure
> 
> Your request is so broad as to be hardly answerable.
> 
> For example, 'ls' is a utility distributed with cygwin that is often
> used for examining filenames in a directory.
> 
> How about something like:
> 
> for IMG_FILE in $(ls image*.tif); do
>   NEWFILE=$(echo $IMG_FILE | sed s/image/proc_image/ )
>   process_image_binary -i $IMG_FILE -o $NEW_FILE
>   rm $IMG_FILE
> done
> 
> as a solution?  
> (Note that the above has typos or other bugs with probability
> approaching 1.  These have been left in as an exercise for the student.)
> 
> I do recall some messages about accessing directory contents from C
> code.  IIRC, the list of POSIX calls available under cygwin, available
> from the cygwin website, included the apropriate item.  I'm a little
> busy, myself, to search the archives right now...
> 
> 
> Eric Monsler
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]