This PR attempts to fix the issues described in #83 by leveraging find.
In cases where ls is used to search for wildcard-ed files, find is restricted to -maxdepth 1 (current folder, no recursion), -type f (must be a file, not directory), and has the extra -printf directive to output only the filename without the path.
In cases where rm was used on wildcarded files (e.g. mapped.*.bed), find was used with the same restrictions, except -printf was replaced with -delete, which will unsurprisingly delete whatever files find identifies meeting the criteria.
Note
I have not tested this yet (I don't have data to test it on atm)
This PR attempts to fix the issues described in #83 by leveraging
find
.ls
is used to search for wildcard-ed files,find
is restricted to-maxdepth 1
(current folder, no recursion),-type f
(must be a file, not directory), and has the extra-printf
directive to output only the filename without the path.rm
was used on wildcarded files (e.g. mapped.*.bed),find
was used with the same restrictions, except-printf
was replaced with-delete
, which will unsurprisingly delete whatever filesfind
identifies meeting the criteria.Note I have not tested this yet (I don't have data to test it on atm)