austenpma / csvfix

Automatically exported from code.google.com/p/csvfix
MIT License
0 stars 0 forks source link

Negative indices when specifying fields #55

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi. A feature request - please could you make it possible to specify fields 
using negative indices. So to exclude final two columns from a csv file, I 
would write something like

    csvfix exclude -f n-1,n test.csv

I realise one risk with this is it assumes the csv has the same number of 
columns n on each line

Original issue reported on code.google.com by matt.hic...@gmail.com on 9 May 2012 at 3:52

GoogleCodeExporter commented 8 years ago
GNU's head and tail have a syntax like this 

Original comment by matt.hic...@gmail.com on 9 May 2012 at 3:53

GoogleCodeExporter commented 8 years ago
http://stackoverflow.com/a/3508041/284795

Original comment by matt.hic...@gmail.com on 9 May 2012 at 4:49

GoogleCodeExporter commented 8 years ago

Original comment by nbutterworth1953@gmail.com on 10 May 2012 at 8:58

GoogleCodeExporter commented 8 years ago
Added -rf flag to exclude command to do this - see rev ad1cd112c651.

Original comment by nbutterworth1953@gmail.com on 22 May 2012 at 3:43