Sample Header Ad - 728x90

Selecting all the records based on filter criteria on 2 fields

-2 votes
5 answers
116 views
ABC,1234.5333,5733.9374,5673.352,352,2.346374,-0.6686874
XYZ,5463.674,93773.683,5734.874,432,-5.683423,-10.38393
AES,7436874.5743,937.6843,8464.5634,564,6.35739,10.6834
PQR,784945.464,57484.8647,57484.453,5764,-10.67484,5.74764
From the above csv file , I need to write shell script which will select all the records where the absolute values for any of the last two fields[ ABS(6th field) or ABS(7th field) ] is > = 10. As a result, my output should look like this:
XYZ,5463.674,93773.683,5734.874,432,-5.683423,-10.38393
AES,7436874.5743,937.6843,8464.5634,564,6.35739,10.6834
PQR,784945.464,57484.8647,57484.453,5764,-10.67484,5.74764
Asked by John (73 rep)
Jan 12, 2023, 11:04 AM
Last activity: Jan 12, 2023, 04:53 PM