I have a csv with the below data
10.000.00.00,D3,1
10.001.00.00,C4,2
10.002.00.00,C5,2
10.000.88.99,B1,3
10.000.00.00,B2,3
10.000.00.00,C6,3
10.000.99.00,D1,3
tried below code
cat Data.csv | awk -F , '$3 == "3" { print }'
Need to get only the rows having last values as 3.
Please let me know how to do this
cat -v Data.csvto see them and thendos2unixor similar to remove them. See stackoverflow.com/a/45772568/1745001 for details.-v RS='\n|\r\n''\n|\r\n'=\r?\n. That approach will fail of course if there truly are supposed to be DOS line endings such as from an Excel export to a CSV where lines end in\r\nbut can contain\ns inside quoted fields.