[ale] Converting CSV files to column based flat files with awk?

Charles Shapiro hooterpincher at gmail.com
Wed Mar 7 13:26:33 EST 2007


Uh, if it was me I'd be lookin' at tr(1) or sed(1), rather than awk.

It really depends in part on whether you have commas which are escaped in
some way in your infile, e.g.

my,very,educated,mother\,and her boyfriend,just,sent,us,nine,pumpkins

If there ain't any commas like this in your infile, then

tr ',' '\t' < infile > outfile will change the delimiters into tabs.

Otherwise, Things could get Interesting.


-- CHS


On 3/7/07, Ned Williams <nedj10 at gmail.com> wrote:
>
> Greeting Ale members,
>
> I need to convert the lines of a csv file into collumned output I think
> this is a function of awk but I cannot seem to find the right combitnation
> of FS and RS options to get it done. Any ideas would be greatly appreciated
>
> thanks
> Ned
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list