xan headers

March 19, 2024 ยท View on GitHub

The headers command displays the column names of given CSV file.

So, given this particular file:

people.csv

namesurname
JohnBlack
LucyRed
GuillaumeOrange

The following command:

xan headers people.csv

Will return:

0 name
1 surname

Note that the command will highlight in red duplicated column names to help you spot them better as they can be cumbersome sometimes.

Ignoring column indices

Using the -j/--just-names you can avoid printing the column indices:

xan headers -j people.csv

Will return:

name
surname