* find -regex not working?
@ 2002-07-12 10:07 Glen Cordrey
2002-07-12 11:59 ` Randall R Schulz
0 siblings, 1 reply; 2+ messages in thread
From: Glen Cordrey @ 2002-07-12 10:07 UTC (permalink / raw)
To: cygwin
If I understand the find man page, the -regex option isn't working for =
me.
find -regex 'MyFile.java'
lists the file, but
find -regex 'MyFile*'
doesn't. Am I specifying the regular expression correctly? If so, what=20
else do I need to do for this to work?
Glen Cordrey gcordrey@convera.com
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: find -regex not working?
2002-07-12 10:07 find -regex not working? Glen Cordrey
@ 2002-07-12 11:59 ` Randall R Schulz
0 siblings, 0 replies; 2+ messages in thread
From: Randall R Schulz @ 2002-07-12 11:59 UTC (permalink / raw)
To: Glen Cordrey, cygwin
Glen,
[ Non-Cygwin-specific question and answer. ]
If you want shell-style (a.k.a., "glob") patterns, use find's "-name" or
"-iname" options. When you use "-regexp" you need to use full regular
expressions such as those used by "grep," "egrep," "sed," or Perl.
To get the effect you want, one of these commands is called for:
find -name "MyFile*"
or
find -regex "MyFile.*"
Randall Schulz
Mountain View, CA USA
At 09:10 2002-07-12, Glen Cordrey wrote:
>If I understand the find man page, the -regex option isn't working for me.
>
>find -regex 'MyFile.java'
>
>lists the file, but
>
>find -regex 'MyFile*'
>
>doesn't. Am I specifying the regular expression correctly? If so, what
>else do I need to do for this to work?
>
>Glen Cordrey
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-12 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-12 10:07 find -regex not working? Glen Cordrey
2002-07-12 11:59 ` Randall R Schulz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).