Skip to main content
1 of 3
Prabhjot Singh
  • 2.4k
  • 1
  • 6
  • 20

Using csvsql:

Assuming your file csv file as:

$ cat input.csv col1,col2,col3,col4,col5,col6,col7,col8,col9,col10,col11,col12,col13 ABC,XYZ,RTY,CREAM,FRANCE,170019,ST REMY CREME,3035540005229,0.75,1,15,26.99,10 ABC,RDS,XSD,SPICE,NETHERLANDS,390476,THE KINGS GINGER,5010493025621,1.5,1,41,49.95,NA ABC,RMS,DKS,TABLE WINE RED,CHILE,400176,SANTA ISABELA,63657001349,3,1,12.5,31.99,0 

This would do:

<input.csv csvsql --query "select * from stdin where col9 >=1 " 

You can change col9 with column name in header in csvfile.

Prabhjot Singh
  • 2.4k
  • 1
  • 6
  • 20