[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Converting CSV files to column based flat files with awk?
- Subject: [ale] Converting CSV files to column based flat files with awk?
- From: hooterpincher at gmail.com (Charles Shapiro)
- Date: Wed, 7 Mar 2007 13:26:33 -0500
- In-reply-to: <[email protected]>
- References: <[email protected]>
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...