Andreas (theloser)
-
about 5 months ago from web
-
@spandexbob I dind't found this by myself -- it was a reply to my request on linuxforums.org :-)
-
@physicspackage @k4k @spandexbob @jordonr The new output is: f1;f2;"f3a,f3b";f4;"f5a,f5b";f6; -- I can use 'cut -d\;' now ;-)
-
@physicspackage @k4k @spandexbob @jordonr This (http://pastebin.com/pCwG0cix) solved my CSV parsing problem (semicolon as new seperators).
-
Muss mir dringend mal ein "Framework" für meine Skripte bauen, das würde das Programmieren von Skripten deutlich beschleunigen. #todo
-
Heute 13 Stunden lang Shell-Skripts geschrieben. Die werden morgen (hoffentl.) in wenigen Minuten das erledigen, wozu ich Stunden bräuchte.
-
@physicspackage Thanks a lot for your scripts, I will check them tomorrow and let you know if they worked for me.
-
@spandexbob Thanks a lot, I will check it tomorrow, when I will have to complete my script :-)
-
@physicspackage: In this case - yes. Field 1, 2 and 10. (I found a work around replacing strings with matching pairs of "" with "xxx").
-
@k4k: Yes, ether ignore the part between matching " or replace the commata with ';' in this part only ...
-
@physicspackage: http://pastebin.com/UbZJzRS4 (something like this :-))
-
@physicspackage @k4k @spandexbob @jordonr See field 5 & 6 on http://pastebin.com/37YAm7N5 ? They do (and sometimes don't) contain commata.
-
@physicspackage @k4k @spandexbob @jordonr Here's the 'real' data I am fiddling with: http://pastebin.com/37YAm7N5 (script: ksh on #AIX ;-))
-
@k4k I see. But my real data is a little more complicated: A single field encapsulated within double quotes can contain multiple commata :-/
-
@spandexbob Urks. I need that "quotechar" option for the 'cut' command in korn shell ;-)
-
@physicspackage This is an example: name,"street,city",country,phone I need to fill four variables: NAME, ADDRESS, COUNTRY, PHONE
-
Replacing the string containing commas with 'foobar' is not _that_ helpful: cat data.txt | sed -e 's/"[^"]\+[^"]\+"/foobar/g'
-
@spandexbob It's a korn shell script on AIX ;-)
-
@physicspackage If you show me how to "insert" your perl skript into my korn shell script you're very welcome ;-)
-
@spandexbob @k4k this is a example line with four fields: name,"street,city",country,phone Problem is field 2: "street,city"