Now on ScienceBlogs: Open Lab: Time is Ticking!

Seed Media Group

Collective Imagination

Greg Laden's Blog

Evolution, Life Sciences, Science Education, Human Evolution, and Stuff

Recent Comments

Profile


Welcome to Greg Laden's Blog.




Nature Blog Network



Search

Join the best atheist themed blogroll!

Archives

Recent Posts

« Five Gunned Down By Comrade in Iraq | Main | Party!!!! »

Command line magic: csv file processing

Category: Computer TricksLinuxTechnologyone-liners
Posted on: May 11, 2009 3:57 PM, by Greg Laden


Is he doing this from memory or is he looking it up as he goes along?


Share this: Stumbleupon Reddit Email + More

TrackBacks

TrackBack URL for this entry: http://scienceblogs.com/mt/pings/109277

Comments

1

I did "sort -t, -k3 test1 | join -v 1 -v 2 -t, -j 3 test2 -" and got essentially the same result (well, fields 1 and 3 were swapped, but big deal, hey?).

Posted by: lylebot | May 11, 2009 7:14 PM

2

er, "test1" and "test2" in my line correspond to "stuff.csv" and "nostuff.csv" respectively.

Posted by: lylebot | May 11, 2009 7:16 PM

3

I have been using PHP to do all my CSV parsing all this time. I should have known there'd be commands that could do it as easily in a bash script. Thanks Greg (and Linux Journal), I learned something new and will probably apply it sometime today. If not for work, then for fun.

Posted by: Jason Thibeault | May 12, 2009 8:28 AM

4

Probably from memory.

After using unix/sunos/solaris/aix/hpux/linux for almost two decades, I've memorized most of the options to the commonly used commands. I'm sure the author of the video has too.

Posted by: Glen | May 12, 2009 2:25 PM

Post a Comment

(Email is required for authentication purposes only. On some blogs, comments are moderated for spam, so your comment may not appear immediately.)





ScienceBlogs

Search ScienceBlogs:

Go to:

Advertisement
Enter to win a free copy of The Monty Hall Problem
Visit the Collective Imagination blog
Advertisement
Collective Imagination

© 2006-2009 Seed Media Group LLC. ScienceBlogs is a registered trademark of Seed Media Group. All rights reserved.

Sites by Seed Media Group: Seed Media Group | ScienceBlogs | SEEDMAGAZINE.COM