This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: cygpath "$@" in a script: bug?
- From: Tino Lange <tino dot lange at isg dot de>
- To: cygwin at cygwin dot com
- Cc: hauser at acm dot org
- Date: Mon, 10 Mar 2003 16:16:02 +0100
- Subject: Re: cygpath "$@" in a script: bug?
- Organization: IS Innovative Software AG
- References: <Pine.GSO.4.44.0303101001390.11568-100000@slinky.cs.nyu.edu>
Then you will call cygpath x-times, which is quite inefficient for large
globbing with wildcards.
Better do something like
*** snip ***
#! /bin/sh
for file in "$@"; do
memfile="${memfile:-""}$file\n"
done
<application> $(echo -e "$memfile" | cygpath -w -f -)
*** snip ***
which results in just one call via an in -memory file-list.
Tino
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/