4 ms·
I was scratching my head for a bit before I realized the final script in the article produces a slightly different output than the previous diff shows (Yusuf/Ca
by frankjr 3y ago
I was scratching my head for a bit before I realized the final script in the article produces a slightly different output than the previous diff shows (Yusuf/Cat vs Yusuf / Cat). Anyway, here's a Nushell version. There's likely a way to use "detect columns" here but it doesn't seem to like the repeated value or something.
$ cat sp_out | lines | parse '{key} {value}' | str trim | transpose -rd | format pattern '{Title} by {Artist}'
Wild World by Yusuf / Cat Stevens
https://www.nushell.sh/cookbook/parsing.html https://www.nushell.sh/cookbook/parsing.html