I have a 30 000+ line CSV file and I do not need most of it. It comes from my supplier and I only want the lines that have value greater then 1 so the lines with 0 in the 6th column that shows quantity of 1 or more I want it to print.
So I am noticing with the awk
command I get weird data and someone tells me it is because of the leading space in front of the 0 in the 6th column
awk '{ print $6 }'
2.1
Link
LAN
SATA
and
2U
SATA
1U
... goes on forever
Is there a way to filter out all the useless lines!
Here is my attempt to do this
awk -F '$6 <= 1 {print $0}'
Here are a few lines
100005,PC-Q08A,Lian-Li Case PC-Q08A Mini Tower 1/0/6 FAN Aluminum USB3.0 Silver Mini-ITX Retail,Lian-Li,CS, 0,145.98,7.92,EA,LB,CSB,ACTIVE,840353002388
100006,PC-Q08B,Lian-Li Case PC-Q08B Mini Tower 1/0/6 FAN Aluminum USB3.0 Black Mini-ITX Retail,Lian-Li,CS, 0,127.28,7.92,EA,LB,CSB,ACTIVE,840353002395
100011,EAH5450SILENT/DI/1GD3(LP),Asus Video Card ATI Radeon HD 5450 1GB DDR3 64Bit Low Profile Silent PCI-Express 2.1 DVI-I/HDMI/HDCP Retail,ASUS TeK,VC, 64,43.93,0.90,EA,LB,V1G,ACTIVE,610839367436
100012,E783686,EloTouch LCD 19inch 1919L E783686 IntelliTouch VGA 1000:1 5m Dark Gray Retail,Elo TouchSystems,MN, 0,748.84,21.50,EA,LB,ML9,ACTIVE,NA
The 3rd line has quantity 64 and that line I want; the rest I do not. Note its the 6th field in the 3rd line that is 64.
awk -F',' '$6>0' file