[PLUG] Looking for a sed script

Eric Wilhelm scratchcomputing at gmail.com
Fri Mar 10 17:48:11 UTC 2006


# from Paul Heinlein
# on Friday 10 March 2006 07:56 am:

>> I have a customer who has supplied me with several hundred
>> spreadsheets containing several hundred rows that contain interface
>> statistics.
>I'm not sure sed is the best tool for that sort of manipulation; awk
>or a general-purpose scripting language (perl, python, ruby) would
>probably serve you better. I think this snippet of perl is akin to
>what you want:

Better yet, since CSV is such a horrible and fragile format (maybe your 
particular CSV doesn't have arbitrary linebreaks thrown in), use the 
spreadsheet directly.

  http://search.cpan.org/~hmbrand/Spreadsheet-Read-0.14/Read.pm

That's still only going to give you access to the formatted (displayed) 
values (I guess they are statically stored in most spreadsheets.)  But, 
it should be more robust than dealing with csv.  It comes with xlscat, 
which makes a good example to crib off of.  Works on sxc, xls, etc, and 
even csv if you only want an abstraction layer.

--Eric
-- 
The only thing that could save UNIX at this late date would be a new $30
shareware version that runs on an unexpanded Commodore 64.
--Don Lancaster (1991)
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------



More information about the PLUG mailing list