I am new to Linux, but my work requires me to do some specific task now, I hope you please help me for this. I have a data set as follow:Cow_ID  Age DIM1   1424    01   1425    11   1426    21   1427    32   1428    42   1429    52   1430    62   1431    73   1432    83   1433    93   1434    103   1435    113   1436    124   1437    134   1438    144   1439    15I want to use awk to subset this data according to Cow_ID and write it to a file. Especially, each file also contain the header as shown in the big data set.I am using this at this moment but it does not work:awk 'Cow_ID=1 {print}' > data1.txtThanks for your help.This is the example output I want to have:data1:Cow_ID  Age DIM1   1424    01   1425    11   1426    21   1427    3Data2:Cow_ID  Age DIM2   1428    42   1429    52   1430    62   1431    7and so forth. Thanks
Subset rows with awk
linux;text processing;awk