[NTLUG:Discuss] A quick script anyone?
Robert Citek
robert.citek at gmail.com
Thu Jul 31 11:16:05 CDT 2008
Are you limited to shell scripting or can you use perl?
If perl, then ...
http://www.perlmeme.org/tutorials/parsing_csv.html
To install on Ubuntu:
$ sudo apt-get install libtext-csv-perl
Regards,
- Robert
On Thu, Jul 31, 2008 at 10:37 AM, Daniel Hauck <daniel at yacg.com> wrote:
> I know there are several very clever script writers here. You guys even
> seem to "think" in terms of scripting. I'm learning little by little
> all the great techniques you guys have shared in the past, but here's
> the present challenge:
>
> Parsing a CSV file and generating some output.
>
> I have a list where the first field is a number and the next two are
> text fields. A line would look like this:
>
> 10, "US", "United States of America"
>
> I just need to be able to parse this line to fill some variables. The
> output part I have down pretty well and will be able to transform this
> file (once I get the line parsing part down) into the output desired.
>
> It might be helpful to know that I will need to discard the quote
> characters and just need the text within.
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
More information about the Discuss
mailing list