Hacker News new | past | comments | ask | show | jobs | submit login

Protip: for "strange" characters, see the -0 argument to xargs. If the file list comes from find, see the -print0 argument there.

    find -print0 | xargs -0 -n1 echo

    echo -n "file '#1'\0file '#2'\0" | xargs -0 -n1 -I{} echo "the file is \"{}\", ok?"



Oh yeah, great I idea. Now insert sorting somewhere between the pipes and use at least one filename with '"' character. Good luck with your xargs. parallel handles all this automatically, you don't even have to know there might be any problems with escaping here.


Thanks - I will take a closer look at parallel.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: