The headers command displays the column names of given CSV file.
So, given this particular file:
people.csv
| name | surname |
|---|---|
| John | Black |
| Lucy | Red |
| Guillaume | Orange |
The following command:
xan headers people.csvWill return:
0 name
1 surnameNote that the command will highlight in red duplicated column names to help you spot them better as they can be cumbersome sometimes.
Using the -j/--just-names you can avoid printing the column indices:
xan headers -j people.csvWill return:
name
surname