delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/25/16:11:25

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <BF35D9C143BCCC4EB63181B67C9320C804DD9F@serv-075.icon-germany.local>
From: Heribert Dahms <heribert_dahms AT icon-gmbh DOT de>
To: "'Eric M. Monsler'" <emonsler AT beamreachnetworks DOT com>,
James Bergstrom
<bergstro AT eng DOT utah DOT edu>
Cc: cygwin AT sources DOT redhat DOT com
Subject: RE: CYGWIN file structure
Date: Wed, 25 Apr 2001 21:22:11 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

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 AT icon-gmbh DOT de)

> -----Original Message-----
> From:	Eric M. Monsler [SMTP:emonsler AT beamreachnetworks DOT com]
> Sent:	Wednesday, April 25, 2001 02:57
> To:	James Bergstrom
> Cc:	cygwin AT sources DOT redhat DOT 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

- Raw text -


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