Skip to content

csvtk v0.2.8

Compare
Choose a tag to compare
@shenwei356 shenwei356 released this 13 Apr 12:21
· 475 commits to master since this release

pretty

Usage

convert CSV to readable aligned table

Usage:
  csvtk pretty [flags]

Flags:
  -r, --align-right        align right
  -s, --separator string   fields/columns separator (default "   ")

Examples:

  1. default

    $ csvtk pretty names.csv
    id   first_name   last_name   username
    11   Rob          Pike        rob
    2    Ken          Thompson    ken
    4    Robert       Griesemer   gri
    1    Robert       Thompson    abc
    NA   Robert       Abel        123
    
  2. align right

    $ csvtk pretty names.csv -r
    id   first_name   last_name   username
    11          Rob        Pike        rob
     2          Ken    Thompson        ken
     4       Robert   Griesemer        gri
     1       Robert    Thompson        abc
    NA       Robert        Abel        123
    
  3. custom separator

    $ csvtk pretty names.csv -s " | "
    id | first_name | last_name | username
    11 | Rob        | Pike      | rob
    2  | Ken        | Thompson  | ken
    4  | Robert     | Griesemer | gri
    1  | Robert     | Thompson  | abc
    NA | Robert     | Abel      | 123