Issue
I have a .csv file and want to extract all the rows only if all the columns contain value >= 10
Example File
A,09,08,07,06
B,10,11,13,17
C,19,09,20,08
D,25,11,10,10
Expected output
B,10,11,13,17
D,25,11,10,10
I have tried, but it is working only for 1 column
awk -F, '{if($2>=10)print $0}'
Solution
Try with this loop:
awk -F, '{for(i=2;i<=NF;i++)if($i<10)next;print}' data.csv
Answered By - protob Answer Checked By - Clifford M. (WPSolving Volunteer)