you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 2 years ago*

I can only remember this because I initially didn't learn about xargs


so any time I need to loop over something I tend to use for var in $(cmd) instead of cmd | xargs. It's more verbose but somewhat more flexible IMHO.

So I run loops a lot on the command line, not just in shell scripts.

  • source
  • parent