Peter Makholm on Nostr: Some developers of linux CLI tools seems to have forgotten how to work with ...
Some developers of linux CLI tools seems to have forgotten how to work with pipelines. More and more often I seem to experience tools that unconditionally formats tabular data into columns with dynamic width.
They lacks an easy way to just show column 1 and 4. But sed(1) to the rescue:
$ ctr -n k8s.io images ls | sed -e 's/\s\s*/\t/g | cut -f 1,4,5
Published at
2024-02-28 13:25:32Event JSON
{
"id": "fdae1a23f9431cf3b680efc25b95c1b408243ea1b712eb4ce1885bcbb6bbe944",
"pubkey": "14ae624d1629acdfc8d92bd61cac8792a23705f2a3c479ceb0a7a71b336bf4c2",
"created_at": 1709126732,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/users/pmakholm/statuses/112009329523850083",
"activitypub"
]
],
"content": "Some developers of linux CLI tools seems to have forgotten how to work with pipelines. More and more often I seem to experience tools that unconditionally formats tabular data into columns with dynamic width.\n\nThey lacks an easy way to just show column 1 and 4. But sed(1) to the rescue:\n\n$ ctr -n k8s.io images ls | sed -e 's/\\s\\s*/\\t/g | cut -f 1,4,5",
"sig": "7c2c42042bc15960afca128bf139b9c965586fa4d7390808aef034ea7eb4516973ca4596d58cfc10d99603c3c657642375a11fc64d82a0201668e4af82d499ab"
}