[mdlug] csv files

Dan Pritts danno at umich.edu
Sat Dec 12 01:30:34 EST 2009


there are lots of gross special cases possible with CSV files
from excel or openoffice.  The perl module i mentioned handles 
many of them.

On Tue, Dec 08, 2009 at 08:36:44PM -0500, Aaron Kulkis wrote:
> Carl T. Miller wrote:
> > Aaron Kulkis wrote:
> >> Carl T. Miller wrote:
> >>> Are there any good command line tools to work with csv files?
> >> AT&T developed some commands for doing this decades ago.
> >>
> >> man cut
> >>    look at the flag to set the field separator to ','
> > 
> > Of course this wouldn't work correctly if there were a
> > comma inside the data, which is allowed in csv files.
> > 
> > For example this data wouldn't parse correctly using cut.
> > 
> > "Name","Age","Description"
> > "Fred",3,"A great, big thing"
> 
> In that case, you need the slightly more sophisticated
> tool called "awk"
> 
> There's a very good tutorial for awk in Volume 2 of the
> Version 7 documentation.
> 
> google for "version 7 man" and you should find a
> page in, I think Dennis Richie's directory, with
> the complete version 7 documentation in 3 PDF files:
> 
> Volume 1  (manual pages)
> Volume 2a (tutorials)
> Volume 2b (more tutorials)
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug

danno
--
dan pritts
danno at umich.edu
734-929-9770



More information about the mdlug mailing list