Languages
[Edit]
EN

Linux - read csv in pretty way in console (column based)

4 points
Created by:
marc_so
264

To read csv in console under linux we can use very popular program column.

Quick solution:

column -s, -t < my_csv_file.csv | less -#2 -N -S

Example

my_csv_file.csv content:

userName, country, favouriteWebpage, color
ann, UK, https://dirask.com/, green
kate, US, https://dirask.com/posts/MySQL-Alter-Table-jmyMLj, blue
john, DE, https://dirask.com/posts/Node-js-express-js-add-cookie-j4qNJ1, white

Using above command our csv will be displayed like:

See also:

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join