• qjkxbmwvz@startrek.website
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    23 hours 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.