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:
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.
There is 1 alternative - vote for the best!
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
If you can do better, submit your command here.
You must be signed in to comment.