torrent/nushell/examples/text_write.nu

21 lines
399 B
Plaintext
Raw Normal View History

2024-01-13 10:01:54 +00:00
"
Band,Album,Year
Fugazi,In On The Kill Taker,1993
Fugazi,The Argument,2001{$x}
Fugazi,7 Songs,1988
Fugazi,Repeater,1990
Fugazi,Steady Diet of Nothing,1991
" | save -f /tmp/test.txt
#-s is skip empty lines
let data = open /tmp/test.txt | lines -s | split column "," Band Album Year | skip 1 | sort-by Year
$data | each { |row| $row.Band + ":" + $row.Album + ":" + $row.Year }
$data |to csv