John-Mark Gurney on Nostr: Thinks of improving sha256 so that it can process multiple files at once via ...
Thinks of improving sha256 so that it can process multiple files at once via threading, then remembers xargs exists.
initial:
```
sha256 */data.bin | sort -k 4
```
improved:
```
ls */data.bin | xargs -L 1 -P 6 sha256 | sort -k 4
```
Published at
2024-07-01 19:22:14Event JSON
{
"id": "9713b418df58607590cedd9a2e80a369f28539da7504d2e085ff6e551078538e",
"pubkey": "69e389f5c741dbf2607d60f238508eddde8ef351c6060b85932b8ecb42b88562",
"created_at": 1719861734,
"kind": 1,
"tags": [
[
"proxy",
"https://flyovercountry.social/@encthenet/112712858605653191",
"web"
],
[
"proxy",
"https://flyovercountry.social/users/encthenet/statuses/112712858605653191",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://flyovercountry.social/users/encthenet/statuses/112712858605653191",
"pink.momostr"
],
[
"expiration",
"1722455065"
]
],
"content": "Thinks of improving sha256 so that it can process multiple files at once via threading, then remembers xargs exists.\n\ninitial:\n```\nsha256 */data.bin | sort -k 4\n```\n\nimproved:\n```\nls */data.bin | xargs -L 1 -P 6 sha256 | sort -k 4\n```",
"sig": "0236c799001c4fb9284291444b8cfbd3b1319eca0c5a0dc5c88721852a13eb85229eac6a60b376b42b63e0a61f04e42fe576a43e57690ceead41ba25a15fcb8e"
}