This is the mail archive of the cygwin@sources.redhat.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]

bash shell expansion question


First of all, cygwin rocks! I use the package every day and the latest
release is very smooth! Im telling my friends and family  ;-)

(This must be a configuration/environment issue.)

on linux bash or solaris ksh I have a (lazy man's) script called f which
looks like:
find . -name $1 -print
works fine lasts a long time when I type
f "*.java"

on cygwin I have an f.sh file
#!/bin/bash
echo f.sh:searching for $1
/usr/bin/find.exe . -name $1 -depth -print
which doesnt work the same:
$ f.sh "*.class"
f.sh:searching for ICockpitServices.class IDistributedSageServices.class
Machine
.class RMIServiceNamer.class
/usr/bin/find.exe: paths must precede expression
Usage: /usr/bin/find.exe [path...] [expression]
in other words, the shell expands the wildcard before passing it to find.
stranger:
$ f.sh '*.Class'	# NOTE:no .Class files exist at top level or below
f.sh:searching for *.Class
$ f.sh *.class
f.sh:searching for ICockpitServices.class
./ICockpitServices.class
$

any suggestions appreciated and TIA,
tom dorgan.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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