Cygwin find not ignoring glob characters

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am attempting to find files that match a list of files I have already generated.
The script I have is:
IFS=$'n' # make newlines the only separator
set -f # disable globbing
set -o noglob
ls e:/fantasypics > c:/tmp/files
for i in $(cat c:/tmp/files); do
echo "$i"
find "c:/Program Files/SomeDir" -iname "$i" >> c:/tmp/foundfiles
done
Some filenames look something like: blahblah[moreblahs]blah.bleh. find does not match these files.
Any ideas?
find cygwin
 |Â
show 3 more comments
up vote
0
down vote
favorite
I am attempting to find files that match a list of files I have already generated.
The script I have is:
IFS=$'n' # make newlines the only separator
set -f # disable globbing
set -o noglob
ls e:/fantasypics > c:/tmp/files
for i in $(cat c:/tmp/files); do
echo "$i"
find "c:/Program Files/SomeDir" -iname "$i" >> c:/tmp/foundfiles
done
Some filenames look something like: blahblah[moreblahs]blah.bleh. find does not match these files.
Any ideas?
find cygwin
Using MingW bash and find also produce the same results.
â ajjb
Apr 3 at 12:20
What exactly is the output? (Note: you shouldn't ever try to parse or script against the output ofls. Usefindor simple globbing instead.) (Note2: you might want to use/cygdrive/c/...rather thanC:/...)
â B Layer
Apr 3 at 13:16
Also, your example filename is ambiguous with the[..]. I can interpret that a couple ways. Can you provide one or two concrete examples?
â B Layer
Apr 3 at 13:22
One more thing, I highly recommend you read these pages: mywiki.wooledge.org/BashFAQ/001 mywiki.wooledge.org/BashFAQ/020 . Decent chance that you'll solve your problem by using one of the methods described there.
â B Layer
Apr 3 at 13:36
As an example for the problematic file: somefile[somecomment]something.jpg ls in the script is not giving me any problems. Nor is using C:/, some files are matching (those without the "").
â ajjb
Apr 4 at 16:14
 |Â
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am attempting to find files that match a list of files I have already generated.
The script I have is:
IFS=$'n' # make newlines the only separator
set -f # disable globbing
set -o noglob
ls e:/fantasypics > c:/tmp/files
for i in $(cat c:/tmp/files); do
echo "$i"
find "c:/Program Files/SomeDir" -iname "$i" >> c:/tmp/foundfiles
done
Some filenames look something like: blahblah[moreblahs]blah.bleh. find does not match these files.
Any ideas?
find cygwin
I am attempting to find files that match a list of files I have already generated.
The script I have is:
IFS=$'n' # make newlines the only separator
set -f # disable globbing
set -o noglob
ls e:/fantasypics > c:/tmp/files
for i in $(cat c:/tmp/files); do
echo "$i"
find "c:/Program Files/SomeDir" -iname "$i" >> c:/tmp/foundfiles
done
Some filenames look something like: blahblah[moreblahs]blah.bleh. find does not match these files.
Any ideas?
find cygwin
edited Apr 3 at 11:38
Wouter Verhelst
7,146831
7,146831
asked Apr 3 at 11:36
ajjb
1
1
Using MingW bash and find also produce the same results.
â ajjb
Apr 3 at 12:20
What exactly is the output? (Note: you shouldn't ever try to parse or script against the output ofls. Usefindor simple globbing instead.) (Note2: you might want to use/cygdrive/c/...rather thanC:/...)
â B Layer
Apr 3 at 13:16
Also, your example filename is ambiguous with the[..]. I can interpret that a couple ways. Can you provide one or two concrete examples?
â B Layer
Apr 3 at 13:22
One more thing, I highly recommend you read these pages: mywiki.wooledge.org/BashFAQ/001 mywiki.wooledge.org/BashFAQ/020 . Decent chance that you'll solve your problem by using one of the methods described there.
â B Layer
Apr 3 at 13:36
As an example for the problematic file: somefile[somecomment]something.jpg ls in the script is not giving me any problems. Nor is using C:/, some files are matching (those without the "").
â ajjb
Apr 4 at 16:14
 |Â
show 3 more comments
Using MingW bash and find also produce the same results.
â ajjb
Apr 3 at 12:20
What exactly is the output? (Note: you shouldn't ever try to parse or script against the output ofls. Usefindor simple globbing instead.) (Note2: you might want to use/cygdrive/c/...rather thanC:/...)
â B Layer
Apr 3 at 13:16
Also, your example filename is ambiguous with the[..]. I can interpret that a couple ways. Can you provide one or two concrete examples?
â B Layer
Apr 3 at 13:22
One more thing, I highly recommend you read these pages: mywiki.wooledge.org/BashFAQ/001 mywiki.wooledge.org/BashFAQ/020 . Decent chance that you'll solve your problem by using one of the methods described there.
â B Layer
Apr 3 at 13:36
As an example for the problematic file: somefile[somecomment]something.jpg ls in the script is not giving me any problems. Nor is using C:/, some files are matching (those without the "").
â ajjb
Apr 4 at 16:14
Using MingW bash and find also produce the same results.
â ajjb
Apr 3 at 12:20
Using MingW bash and find also produce the same results.
â ajjb
Apr 3 at 12:20
What exactly is the output? (Note: you shouldn't ever try to parse or script against the output of
ls. Use find or simple globbing instead.) (Note2: you might want to use /cygdrive/c/... rather than C:/...)â B Layer
Apr 3 at 13:16
What exactly is the output? (Note: you shouldn't ever try to parse or script against the output of
ls. Use find or simple globbing instead.) (Note2: you might want to use /cygdrive/c/... rather than C:/...)â B Layer
Apr 3 at 13:16
Also, your example filename is ambiguous with the
[..]. I can interpret that a couple ways. Can you provide one or two concrete examples?â B Layer
Apr 3 at 13:22
Also, your example filename is ambiguous with the
[..]. I can interpret that a couple ways. Can you provide one or two concrete examples?â B Layer
Apr 3 at 13:22
One more thing, I highly recommend you read these pages: mywiki.wooledge.org/BashFAQ/001 mywiki.wooledge.org/BashFAQ/020 . Decent chance that you'll solve your problem by using one of the methods described there.
â B Layer
Apr 3 at 13:36
One more thing, I highly recommend you read these pages: mywiki.wooledge.org/BashFAQ/001 mywiki.wooledge.org/BashFAQ/020 . Decent chance that you'll solve your problem by using one of the methods described there.
â B Layer
Apr 3 at 13:36
As an example for the problematic file: somefile[somecomment]something.jpg ls in the script is not giving me any problems. Nor is using C:/, some files are matching (those without the "").
â ajjb
Apr 4 at 16:14
As an example for the problematic file: somefile[somecomment]something.jpg ls in the script is not giving me any problems. Nor is using C:/, some files are matching (those without the "").
â ajjb
Apr 4 at 16:14
 |Â
show 3 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435259%2fcygwin-find-not-ignoring-glob-characters%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Using MingW bash and find also produce the same results.
â ajjb
Apr 3 at 12:20
What exactly is the output? (Note: you shouldn't ever try to parse or script against the output of
ls. Usefindor simple globbing instead.) (Note2: you might want to use/cygdrive/c/...rather thanC:/...)â B Layer
Apr 3 at 13:16
Also, your example filename is ambiguous with the
[..]. I can interpret that a couple ways. Can you provide one or two concrete examples?â B Layer
Apr 3 at 13:22
One more thing, I highly recommend you read these pages: mywiki.wooledge.org/BashFAQ/001 mywiki.wooledge.org/BashFAQ/020 . Decent chance that you'll solve your problem by using one of the methods described there.
â B Layer
Apr 3 at 13:36
As an example for the problematic file: somefile[somecomment]something.jpg ls in the script is not giving me any problems. Nor is using C:/, some files are matching (those without the "").
â ajjb
Apr 4 at 16:14