[kde-edu]: script for comand line needed

Sabine Emmy Eller s.eller at voxhumanitatis.org
Fri Feb 5 18:27:30 CET 2010

Hi - hopefully someone of you can help me here.

I managed to be able to convert a table to kvtml2 for KHangMan, but part of
the work is still being done manually and having many "categories" that
takes loads of time.

What I am doing now is deleting rows manually. I know now how to delete the
first column in a .csv file from comand line and therefore there must be
such a "cut" command to delete lines as well.

Example of the csv:

ID;source;category;target1;target2; etc.
1;cat;animal,Katze;gatto; etc.
2;dog;animal;Hund;cane; etc.
3;Germany;country;Deutschland;Germania; etc.
4;Italy;country;Italien;Italia; etc.
5;bread;food;Brot;pane; etc.
6;potatoe;food;Kartoffel;patata; etc.

now what I need is a command that cuts all lines where column 3 does not
correspond to <category name>

Can anyone help with that?

This can be a command line or python script - in the end it does not make
any difference. I am now using a .sh file to execute the various scripts or
commands one after the other to get the final files I need.

I know this can be resolved in a more elegant way, but actually: for me only
the result counts, not how elegant and nice the script is that I use.

Thanks in advance!

Cheers, Sabine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-edu/attachments/20100205/5f1760b2/attachment.htm 

More information about the kde-edu mailing list