hatem@okra:~$ column -s, -t <~/projects/ummahrepos/2009_prayer_times.csv date week_day fajr_azan fajr_iqama sunrise dhuhr_azan dhuhr_iqama asr_azan asr_iqama maghrib_azan maghrib_iqama isha_azan isha_iqama 2009-01-01 Thurusday 06:24 07:00 07:51 12:19 12:30 14:28 15:00 16:45 16:45 18:14 19:30 2009-01-02 Friday 06:24 07:00 07:51 12:19 12:30 14:29 15:00 16:46 16:46 18:14 19:30 2009-01-03 Saturday 06:24 07:00 07:51 12:20 12:30 14:29 15:00 16:47 16:47 18:15 19:30 2009-01-04 Sunday 06:24 07:00 07:51 12:20 12:30 14:30 15:00 16:48 16:48 18:16 19:30 2009-01-05 Monday 06:24 07:00 07:51 12:21 12:30 14:31 15:00 16:49 16:49 18:17 19:30 2009-01-06 Tuesday 06:24 07:00 07:51 12:21 12:30 14:32 15:00 16:50 16:50 18:18 19:30 2009-01-07 Wednesday 06:24 07:00 07:51 12:21 12:30 14:33 15:00 16:52 16:52 18:19 19:30 2009-01-08 Thurusday 06:24 07:00 07:50 12:22 12:30 14:34 15:00 16:53 16:53 18:20 19:30 2009-01-09 Friday 06:24 07:00 07:50 12:22 12:30 14:35 15:00 16:54 16:54 18:21 19:30 2009-01-10 Saturday 06:23 07:00 07:50 12:23 12:30 14:36 15:00 16:55 16:55 18:22 19:30 2009-01-11 Sunday 06:23 07:00 07:49 12:23 12:30 14:37 15:00 16:56 16:56 18:23 19:30 2009-01-12 Monday 06:23 07:00 07:49 12:23 12:30 14:38 15:00 16:57 16:57 18:24 19:30 2009-01-13 Tuesday 06:23 07:00 07:48 12:24 12:30 14:39 15:00 16:58 16:58 18:25 19:30 2009-01-14 Wednesday 06:22 07:00 07:48 12:24 12:30 14:40 15:00 17:00 17:00 18:26 19:30 2009-01-15 Thurusday 06:22 07:00 07:47 12:24 12:30 14:42 15:00 17:01 17:01 18:27 19:30 2009-01-16 Friday 06:21 07:00 07:47 12:25 12:30 14:43 15:00 17:02 17:02 18:28 19:30 2009-01-17 Saturday 06:21 07:00 07:46 12:25 12:30 14:44 15:00 17:03 17:03 18:29 19:30 2009-01-18 Sunday 06:20 07:00 07:46 12:25 12:30 14:45 15:00 17:05 17:05 18:31 19:30 2009-01-19 Monday 06:20 07:00 07:45 12:26 12:30 14:46 15:00 17:06 17:06 18:32 19:30 2009-01-20 Tuesday 06:19 07:00 07:44 12:26 12:30 14:47 15:00 17:07 17:07 18:33 19:30 2009-01-21 Wednesday 06:19 07:00 07:43 12:26 12:30 14:48 15:00 17:09 17:09 18:34 19:30 2009-01-22 Thurusday 06:18 07:00 07:43 12:27 12:30 14:50 15:00 17:10
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 Show Sample Output
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: