'How to sort column values in csv file using shell script or command?

I have a csv file with the below values:

IP        Code
10.0.0.1  200
10.2.0.1  400
10.3.0.2  100
10.2.3.1  201

I want to extract IPs whose code is either 200 or more than that. What can be the simplest way to do it in linux?



Solution 1:[1]

Is awk an option?

awk 'NR>1 && $2>=200 {print $1}' file.csv
10.0.0.1
10.2.0.1
10.2.3.1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pmf