On 15/07/2010 12:38, Daniel Pope wrote:
On 15/07/10 12:32, Chris. Aubrey-Smith wrote:
I was blithely
informed that there was no problem, since I could buy a piece of
software which would turn the CSV files back the right way up.

cat >flip_csv.py <<END

import sys
lines = sys.stdin.readlines()
lines.reverse()
for l in lines:
sys.stdout.write(l)

END
python flip_csv.py <input.csv >output.csv

Dan

--
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------

tac input.csv > output.csv

tac == cat backwards :)

--
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------

Reply via email to