Julien Riou on Nostr: TIL that we can easily convert a list of values with new lines to a space separated ...
TIL that we can easily convert a list of values with new lines to a space separated list of values using the "paste" command:
```
$ cat servers.txt
server1
server2
server3
```
To
```
$ paste -sd ' ' < servers.txt
server1 server2 server3
```
#gnu #coreutils
Published at
2024-12-02 11:41:56Event JSON
{
"id": "0c82e814bfce0f8889ef47ce42f9148da9b53701c2d5a83a2674bbb6c0d8f439",
"pubkey": "6273af64346690e64a2e2e62fd995631305adc8d2b460b2bbf2ce9307dce7a23",
"created_at": 1733139716,
"kind": 1,
"tags": [
[
"t",
"gnu"
],
[
"t",
"coreutils"
],
[
"proxy",
"https://hachyderm.io/users/jriou/statuses/113583044436219494",
"activitypub"
]
],
"content": "TIL that we can easily convert a list of values with new lines to a space separated list of values using the \"paste\" command:\n\n```\n$ cat servers.txt \nserver1\nserver2\nserver3\n```\nTo\n```\n$ paste -sd ' ' \u003c servers.txt \nserver1 server2 server3\n```\n\n#gnu #coreutils",
"sig": "53d5810b9afcc3aed35b5924eb3be003ae6eb93415a31e185e702ea1d9e6e391e00998708a331b23b40a9c66923af8b84110df87200a828e3f2aefe620226193"
}