top | item 13780875

(no title)

steve-howard | 9 years 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.

discuss

order

kccqzy|9 years ago

If we take UNIX to mean the POSIX standard, it doesn't work because -print0 is not in POSIX, and neither is -0 for xargs.