8 ms·
What bugged me more was the snippets designed to show how hard it is to write shell scripts. It looked like the author just didn't know enough about their tools
by steve-howard 10y ago
What bugged me more was the snippets designed to show how hard it is to write shell scripts. It looked like the author just didn't know enough about their tools:
>How to touch all files in foo (and its subfolders)?
find foo -print0 | xargs -0 touch
find foo -exec touch {} \;
I agree with the other commenters who think it's fine to write whatever you like on your own blog, I just feel that it went from interesting historical warts to bagging on legacy systems because they're complicated.
- kccqzy 10y agoIf we take UNIX to mean the POSIX standard, it doesn't work because -print0 is not in POSIX, and neither is -0 for xargs.