[Toybox] find applet arguments, quotations and wildcards

darken darken at darken.eu
Wed Feb 7 03:36:55 PST 2018


I just noticed the following find applet behavior with regards to wildcards.
I don't think it's a bug as it shows in all find applets, but I'm puzzled
by what is happening.

It seems that when using wildcards and the search results contain a
wildcard match that contains a dash, then find uses the result as argument
option? Why?

~Matthias

```
sailfish:/sdcard $ find --version
toybox 0.7.4-android
sailfish:/sdcard $ find . -iname *data
find: bad arg 'sleep-data'
1|sailfish:/sdcard $ find . -iname "*data"
./Android/data
./data
./sleep-data
./Documents/sleep-data
sailfish:/storage/emulated/0 # find . -iname *droid
./Android


sailfish:/storage/emulated/0 # /data/local/tmp/busybox-armv6l find . -iname
*data
find: unrecognized: sleep-data
BusyBox v1.26.2 (2017-01-11 08:43:16 UTC) multi-call binary.


darken at greendns:~/test$ find --version
find (GNU findutils) 4.7.0-git
darken at greendns:~/test$ mkdir -p Android/data
darken at greendns:~/test$ mkdir data
darken at greendns:~/test$ mkdir sleep-data
darken at greendns:~/test$ mkdir -p Documents/sleep-data
darken at greendns:~/test$ find . -iname *data
find: paths must precede expression: sleep-data
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20180207/48158426/attachment.html>


More information about the Toybox mailing list