DEV Community

Discussion on: Remove all your local git branches but keep main

Collapse
 
deciduously profile image
Ben Lovy

Every time I successfully use xargs I spend the next several hours thinking "whoa, I did an xargs". It somehow never gets old.

Solid xargs, good stuff.

Collapse
 
phlash profile image
Phil Ashby

Ha, nice :)

For extra coolness, especially when processing files with whitespace, I have trained my muscle memory to use:
find ... -print0 | xargs -0 ...
replacing the whitespace separator with ASCII NUL.