possible problem with "find . -name blah -o -name blah2"
Andrey Repin
anrdaemon@yandex.ru
Wed Aug 20 22:50:00 GMT 2014
Greetings, mlist@bogusville.us!
> using CYGWIN_NT-6.1, bash 4.1.11(2) and find 4.5.12, the following returns
> immediately
> find . -name \*.cs -o -name \*.h -o -name \*.cpp -exec ls {} \;
> pick your favorite for 'ls'
$ uname -a
CYGWIN_NT-5.1 daemon2 1.7.32s(0.274/5/3) 20140807 16:26:58 i686 Cygwin
$ find . -name \*.cs -o -name \*.h -o -name \*.cpp -exec ls {} \;
./farmanager-read-only/enc/enc_rus/meta/articles/panel/panelplugin.1/desktop.cpp
./farmanager-read-only/enc/enc_rus/meta/articles/panel/panelplugin.1/main.cpp
./farmanager-read-only/enc/enc_rus/meta/articles/panel/panelplugin.1/mix.cpp
./farmanager-read-only/misc/fexcept/execdump/ExcDump.cpp
./farmanager-read-only/misc/fexcept/execdump/test/test.cpp
./farmanager-read-only/misc/fexcept/execdump/xxlib/Std/2asm.cpp
> this works as expected
> find . -name \*.cs -o -name \*.h -o -name \*.cpp
> it's probably not a horrible problem but i thought i'd report it.
Can't seems to replicate it on my setup. Do you use 64-bit Cygwin?
Discussion aside, please use -execdir rather than -exec to avoid race
conditions in a time gap between find's decision to run something and
actually running that something.
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 21.08.2014, <02:39>
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list