My problem is very similar to this. I basically want to add a column of timestamps to a .csv-file with bash. I'm using this script:
cat foo.csv | while read line ; do echo $line\;$(date -d "$t" "+%s") ; done
and this .csv-file (foo.csv):
2011-11-25 12:00:00
2010-11-25 13:00:00
2009-11-25 14:00:00
but instead of getting the expected output, I get an output like this:
2011-11-25,12:00:00;1400882400
2010-11-25,13:00:00;1400882400
2009-11-25,14:00:00;1400882400
Anybody who knows what might be wrong?