Ivan on Nostr: Every time I’d reach for `xargs` in a shell pipeline crunching a lot of inputs ...
Every time I’d reach for `xargs` in a shell pipeline crunching a lot of inputs I’d always worry about there being too many arguments and blowing past the system exec limits, and manually try to limit invocations with a guesstimate of how many max args to use
Except I just learned that `xargs` can not only inspect the system and figure out how many args to use safely, it does it *by default*!
Easily one of my favorite utilities that went up in my list today
Published at
2024-05-10 23:14:05Event JSON
{
"id": "339d81d997be5f93338df3420e3d31eead97c048b1d6a7c8236180f03f8efa3d",
"pubkey": "731b98e922b38a200bcd01709e6f53e7464b94e2fa4bc21b82152df6afe2e8ef",
"created_at": 1715382845,
"kind": 1,
"tags": [
[
"proxy",
"https://hachyderm.io/@ivan/112419330151023443",
"web"
],
[
"proxy",
"https://hachyderm.io/users/ivan/statuses/112419330151023443",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://hachyderm.io/users/ivan/statuses/112419330151023443",
"pink.momostr"
]
],
"content": "Every time I’d reach for `xargs` in a shell pipeline crunching a lot of inputs I’d always worry about there being too many arguments and blowing past the system exec limits, and manually try to limit invocations with a guesstimate of how many max args to use\n\nExcept I just learned that `xargs` can not only inspect the system and figure out how many args to use safely, it does it *by default*!\n\nEasily one of my favorite utilities that went up in my list today",
"sig": "ccb2ea2c9a0ecce6e13211026b971b792b30b0f8493ff04881b9ad363e67dfdc64671857758ba46ea724ec455c6a7ee63ce0f3955f648b9866e68d626e909d05"
}