Command Line Magic on Nostr: Add some spice to your text by randomly coloring each word in a text file. head -n30 ...
Add some spice to your text by randomly coloring each word in a text file.
head -n30 cat_haiku.txt | awk 'BEGIN{srand()} RS=" " {c=int(rand()*200)+32;printf "\033[38;5;" c "m" $0 "\033[0m "}'
Published at
2024-09-24 14:40:01Event JSON
{
"id": "93a890715e41a55c4e824b98d74081db121f06b074f99ba93e3278fbea95fb4a",
"pubkey": "f5f1075f3fad1755cef1ef9024d53eafd24ea460383319ffb9949f3b6a3cde1a",
"created_at": 1727188801,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/climagic/statuses/113193045313520566",
"activitypub"
]
],
"content": "Add some spice to your text by randomly coloring each word in a text file.\n\nhead -n30 cat_haiku.txt | awk 'BEGIN{srand()} RS=\" \" {c=int(rand()*200)+32;printf \"\\033[38;5;\" c \"m\" $0 \"\\033[0m \"}'\n\nhttps://files.mastodon.social/media_attachments/files/113/193/041/929/843/863/original/5dfe3f78c330ada3.jpg",
"sig": "b827623b1e0fe7b6726bf412c94243b3e6153117230fd94819c70cdebfddc26b1a0db30e2034f479952064247641606d6945347c8a14210946e4530f9079d6b6"
}