[Nottingham] Sed regex problem

Camilo Mesias camilo at mesias.co.uk
Thu Oct 13 11:53:16 UTC 2011


HI,

you might be able to use awk,

awk -F, '{ OFS=","; $6 = -$6 ; print}' you-filename-here.csv

That's reasonably clean apart from the gibberish to set the input and
output field separators. I'm not sure if it will work for quoted csv
fields though.

-Cam



More information about the Nottingham mailing list