Hacker News new | ask | show | jobs
by samtheprogram 11 days ago
Literally just use xargs with -I {} and quotation marks?
1 comments

That won't save you from weird file names, but null termination will.
Passing "{}" handles most sane cases including spaces. If I'm doing bash that needs to be robust (rare and/or dotfiles) or know the folder/dataset has weird filenames, sure.