Re:Working with CSV files on shell/terminal
by LispSporks22 on Wednesday June 28, 2023 @01:33PM
(#36509759)
Load the (built-in) CSV module in Ruby.
Eval the following string as Ruby code.
Create CSV parser with standard input `$<` as the source.
Run the code in the block that follows for each row (automatically skips the CSV header):
For a row, print the first/0th element. Can be simplified in recent Ruby:
[ Parent
| on HN ]