commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Will handle pretty much all types of CSV Files.
The ^M character is typed on the command line using Ctrl-V Ctrl-M and can be replaced with any character that does not appear inside the CSV.
Tips for simpler CSV files:
* If newlines are not placed within a csv cell then you can replace `map(repr, r)` with r
There are 9 alternatives - vote for the best!
Splits the input based on commas and prints it in a nice column format. This would not work for CSV rows that have "," between quotes or with newline characters. Use only simple simple csv files.
If you can do better, submit your command here.
You must be signed in to comment.