Splitting a string on the command line - the search for the one-liner
It seems like the command line is one of those places where you can accomplish crazy efficient things with one-liners.
Here’s a perfect use case for a CLI one-liner:
In Anki, I often add lists of synonyms and antonyms to my vocabulary cards, but I like them formatted as a bulleted list. My usual route to that involves Markdown. But how to convert this:
известный, точный, определённый, достоверный
to
- `известный`
- `точный`
- `определённый`
- `достоверный`
After trying to come up with a single text replacement strategy to make this work, the best I could do was this: