Update of bug #20245 (project findutils):
Assigned to: None => rwp
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
The problem you have experienced is not a bug in find but is due to
insufficient evaluation of quoted arguments. This can be seen by using 'sh
-x' to invoke your test script.
mask="-name '$2'"
find $1 $mask -type f -print
$ sh -x ./script '*txt'
+ mask='-name '\''*txt'\'''
+ find . -name ''\''*txt'\''' -type f -print
The find program is receiving the quote characters. In your example the find
command needs a shell 'eval' in order to remove one layer of shell quoting.
mask="-name '$2'"
eval find $1 $mask -type f -print
I hope this helps. If it does not resolve your issue then please post again.
Thanks.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?20245>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils