Thread CSv-datei ändern (5 answers)
Opened by Sara456 at 2014-04-22 15:02

Raubtier
 2014-04-22 16:46
#174918 #174918
User since
2012-05-04
1054 Artikel
BenutzerIn

user image
So?
Code: (dl )
1
2
perl -MPOSIX -E'scalar <> for 1..2;say "ID,datumaktuel";say ++$id,",",strftime("%Y%m%d",localtime),"," while <>' < test.csv > firstcols.tmp
paste firstcols.tmp test.csv > test-converted.csv


PS: Muss datumaktuel mit einem l sein? Sonst doppel-l nehmen.

Edit2: Ach so, du willst auch was entfernen... Sorry, obige Lösung fügt nur hinzu. Könnte ggf. auch ausreichen, oder stören zusätzliche Werte?
Last edited: 2014-04-22 16:49:56 +0200 (CEST)

View full thread CSv-datei ändern