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]
Other format: [Raw text]

Re: cygpath "$@" in a script: bug?


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/


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