Magic Pipes

mpcsv-read [-T|D delim-char]

Reads comma separated values (or, if a delimiter char is specified, values separated by that delimiter; or if -T is specified, tab-separated values) from standard input. Each record (line) read from standard input is written as a list sexpr of the values in order.

Parses quoted values as per the Chicken CSV egg.


mpcsv-read < test.csv | mpmap 'list->vector' | mpjson-write
mpcsv-read -D : < /etc/passwd | mpmap car # returns a list of usernames