print_list [ "field_separator" [ indent ]]
The first row is treated as header row. The width of all columns is dynamically adjusted to the row containing the longest column entry.
Text columns are aligned to the left, bare number columns are aligned to the right.
To select named columns from the CSV data prior to the formatting of the list with print_list use select_columns(3) .
The following CSV data received via pipe
type cities.csv ZIP;CITY;STATE;CNT;COUNTRY 93117;Goleta;CA;USA;United States of America 8222;Beringen;SH;CH;Switzerland 8005;Cape Town;WC;RSA;South Africa type cities.csv | print_list
results in the output:
ZIP CITY STATE CNT COUNTRY ----- --------- ----- --- ------------------------ 93117 Goleta CA USA United States of America 8222 Beringen SH CH Switzerland 8005 Cape Town WC RSA South Africa (3)
The columns CNT, ZIP and CITY of the CSV data are selected using the select_columns(3) command and then formatted to a list using the print_list command
type cities.csv ZIP;CITY;STATE;CNT;COUNTRY 93117;Goleta;CA;USA;United States of America 8222;Beringen;SH;CH;Switzerland 8005;Cape Town;WC;RSA;South Africa type cities.csv | select_columns ";" "CNT;ZIP;CITY" | print_list what will result in the output: CNT ZIP CITY --- ----- --------- USA 93117 Goleta CH 8222 Beringen RSA 8005 Cape Town (3)
This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.