dDocent icon indicating copy to clipboard operation
dDocent copied to clipboard

replace ls and rm with find

Open pdimens opened this issue 2 years ago • 0 comments

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)

pdimens avatar Oct 20 '22 14:10 pdimens