Problem command system Linux
I have problem in command is not working correctly I want to sort third field and fourth field using command $ sort -t. -k3n -k4n sort delimiter is point '.' -n, --numeric-sort : compare according to string numerical value. $ nano sort $ cat sort 192.168.1.245.www.test.com.80 192.168.1.17.www.test.net.8012 192.168.2.5.www.test.org.8001 192.168.3.1.www.test.ma.8098 192.168.2.15.www.test.to.8080 $ sort -t. -k3n -k4n sort 192.168.1.17.www.test.net.8012 192.168.1.245.www.test.com.80 192.168.2.15.www.test.to.8080 192.168.2.5.www.test.org.8001 192.168.3.1.www.test.ma.8098 It has to be like this because 5 < 15 192.168.1.17.www.test.net.8012 192.168.1.245.www.test.com.80 192.168.2.5.www.test.org.8001 192.168.2.15.www.test.to.8080 192.168.3.1.www.test.ma.8098