0
Trying to grep the files in several child directories, grep returns nothing.
~/box/raw $ grep ":2259\"" f*/hh*.adt
~/box/raw $
But when I descend into one of the child directories, grep finds a match.
~/box/raw/f040 $ grep ":2259\"" hh*.adt
hh_sr2014_v8.adt:"2/23/2015 2:33:49 PM","Leave Field:Introduction.BQ1a","Cause:Next Field","Status:Normal","Value:2259"
This works (i.e., finds the match):
~/box/raw $ grep ":2259\"" f040/hh*.adt
But these don't:
~/box/raw $ grep ":2259\"" f???/hh*.adt
~/box/raw $ grep ":2259\"" f???/hh_sr2014_v8.adt
~/box/raw $ grep ":2259\"" f*/hh_sr2014_v8.adt
There seem to be some rules about wildcard expansion in directory names that I don't understand. What are they?
This is on Cygwin on a Windows 7 machine. uname -r
gives me "1.7.33-2(0.280/5/3)".
1can you try some testing with other commands e.g.
ls
, I think this may show that the issue is down to cygwin's shell expansion notgrep
. – gogoud – 2015-04-03T06:29:18.3301+1 gogoud,
~/box $ ls r*/f*
gives "no such file or directory", becausels
andgrep
are case sensitive but the filesystem isn't. – katriel – 2015-04-03T06:47:38.970