Hal Pomeranz on Nostr: Useful shell idiom: ... | (head && echo ... && tail) Prints the first 10 lines and ...
Useful shell idiom:
... | (head && echo ... && tail)
Prints the first 10 lines and the last 10 lines of your output with a nice "..." line in between. You can use the normal arguments to "head" and "tail" if you want more or less than 10 lines.
Published at
2025-02-17 00:05:10Event JSON
{
"id": "8cc3c5d851f1fdcc46e2b38f53c79205642927d6b578b5b251ffecbbe24bed45",
"pubkey": "fa8a3ecc28f5281dcf43d9313788b894dff44fba05bc1fd1af3667248894bd59",
"created_at": 1739750710,
"kind": 1,
"tags": [
[
"proxy",
"https://infosec.exchange/users/hal_pomeranz/statuses/114016302584106284",
"activitypub"
]
],
"content": "Useful shell idiom:\n\n... | (head \u0026\u0026 echo ... \u0026\u0026 tail)\n\nPrints the first 10 lines and the last 10 lines of your output with a nice \"...\" line in between. You can use the normal arguments to \"head\" and \"tail\" if you want more or less than 10 lines.",
"sig": "08ef56910e5368127fc937983c03cbe4838276a7ac3c26168696deec5eb60cef77cc9511ec078b6a2cc51b8bf752eea28a630126ef90c2d71fb5f7c1cfb9f676"
}