|
|
|
|
|
by nirinor
1244 days ago
|
|
I've needed these capabilities often while using awk for converting messy logs/error outputs into tables/commands. Nowadays I like the nushell approach to the composition: echo 'quux=123 foo=123 bar=123' | str replace '.*quux=([0-9]+).*foo=([0-9]+).*' $"$2,$1" | from csv -n | each {|r| $r.column1 + $r.column2}
which of course relies on the same regex library (hattip). |
|