column file in the following format and I am using macOS:
./tmp/7000_CNE_lig752_cl_0.5| -10.1000| 58
./tmp/7000_CNE_lig1029_cl_0.5| -8.0200| 40
./tmp/7000_CNE_lig183_cl_0.5| -8.0400| 32
./tmp/7000_CNE_lig247_cl_0.5| -8.3000| 28
./tmp/7000_CNE_lig331_cl_0.5| -8.9400| 31
./tmp/7000_CNE_lig578_cl_0.5| -8.2400| 76
./tmp/7000_CNE_lig587_cl_0.5| -8.5800| 35
./tmp/7000_CNE_lig659_cl_0.5| -8.0600| 31
./tmp/7000_CNE_lig679_cl_0.5| -8.7500| 36
./tmp/7000_CNE_lig767_cl_0.5| -8.9600| 86
./tmp/7000_CNE_lig830_cl_0.5| -8.2700| 32
./tmp/7000_CNE_lig841_cl_0.5| -8.1600| 32
./tmp/7000_CNE_lig842_cl_0.5| -8.5700| 33
./tmp/7000_CNE_lig900_cl_0.5| -8.1400| 61
./tmp/7000_CNE_lig931_cl_0.5| -8.9400| 40
./tmp/7000_CNE_lig933_cl_0.5| -8.6200| 101
./tmp/7000_CNE_lig987_cl_0.5| -8.6200| 55
./tmp/7000_CNE_lig996_cl_0.5| -8.2300| 31
./tmp/7000_CNE_lig998_cl_0.5| -8.6800| 48
./tmp/7000_CNE_lig999_cl_0.5| -8.0000| 29
./tmp/7000_CNE_lig1002_cl_0.5| -7.0900| 32
./tmp/7000_CNE_lig1009_cl_0.5| -7.4600| 22
./tmp/7000_CNE_lig1023_cl_0.5| -7.8700| 25
./tmp/7000_CNE_lig1032_cl_0.5| -7.1200| 20
./tmp/7000_CNE_lig1033_cl_0.5| -7.4400| 26
./tmp/7000_CNE_lig118_cl_0.5| -7.4400| 11
./tmp/7000_CNE_lig179_cl_0.5| -7.8000| 26
./tmp/7000_CNE_lig180_cl_0.5| -7.3800| 38
./tmp/7000_CNE_lig24_cl_0.5| -7.3600| 32
./tmp/7000_CNE_lig25_cl_0.5| -7.0600| 26
I need some one line SORT command which will sort the values according to the second column from lowest to highest. Here what I have already tried using sort command:
sort -t'|' -nk2 7000_CNE_TOP.csv
7000_CNE_lig752_cl_0.5| -10.1000| 58
7000_CNE_lig1029_cl_0.5| -8.0200| 40
7000_CNE_lig183_cl_0.5| -8.0400| 32
7000_CNE_lig247_cl_0.5| -8.3000| 28
7000_CNE_lig331_cl_0.5| -8.9400| 31
7000_CNE_lig578_cl_0.5| -8.2400| 76
7000_CNE_lig587_cl_0.5| -8.5800| 35
7000_CNE_lig659_cl_0.5| -8.0600| 31
7000_CNE_lig679_cl_0.5| -8.7500| 36
7000_CNE_lig767_cl_0.5| -8.9600| 86
7000_CNE_lig830_cl_0.5| -8.2700| 32
7000_CNE_lig841_cl_0.5| -8.1600| 32
7000_CNE_lig842_cl_0.5| -8.5700| 33
7000_CNE_lig900_cl_0.5| -8.1400| 61
7000_CNE_lig931_cl_0.5| -8.9400| 40
7000_CNE_lig933_cl_0.5| -8.6200| 101
7000_CNE_lig987_cl_0.5| -8.6200| 55
7000_CNE_lig996_cl_0.5| -8.2300| 31
7000_CNE_lig998_cl_0.5| -8.6800| 48
7000_CNE_lig999_cl_0.5| -8.0000| 29
7000_CNE_lig1002_cl_0.5| -7.0900| 32
7000_CNE_lig1009_cl_0.5| -7.4600| 22
7000_CNE_lig1023_cl_0.5| -7.8700| 25
7000_CNE_lig1032_cl_0.5| -7.1200| 20
7000_CNE_lig1033_cl_0.5| -7.4400| 26
7000_CNE_lig118_cl_0.5| -7.4400| 11
7000_CNE_lig179_cl_0.5| -7.8000| 26
7000_CNE_lig180_cl_0.5| -7.3800| 38
7000_CNE_lig24_cl_0.5| -7.3600| 32
or alternatively using -nk 2,2, which gives the same results
sort -t'|' -nk2,2 7000_CNE_TOP.csv
7000_CNE_lig752_cl_0.5| -10.1000| 58
7000_CNE_lig1029_cl_0.5| -8.0200| 40
7000_CNE_lig183_cl_0.5| -8.0400| 32
7000_CNE_lig247_cl_0.5| -8.3000| 28
7000_CNE_lig331_cl_0.5| -8.9400| 31
7000_CNE_lig578_cl_0.5| -8.2400| 76
7000_CNE_lig587_cl_0.5| -8.5800| 35
7000_CNE_lig659_cl_0.5| -8.0600| 31
7000_CNE_lig679_cl_0.5| -8.7500| 36
7000_CNE_lig767_cl_0.5| -8.9600| 86
7000_CNE_lig830_cl_0.5| -8.2700| 32
7000_CNE_lig841_cl_0.5| -8.1600| 32
7000_CNE_lig842_cl_0.5| -8.5700| 33
7000_CNE_lig900_cl_0.5| -8.1400| 61
7000_CNE_lig931_cl_0.5| -8.9400| 40
7000_CNE_lig933_cl_0.5| -8.6200| 101
7000_CNE_lig987_cl_0.5| -8.6200| 55
7000_CNE_lig996_cl_0.5| -8.2300| 31
7000_CNE_lig998_cl_0.5| -8.6800| 48
7000_CNE_lig999_cl_0.5| -8.0000| 29
7000_CNE_lig1002_cl_0.5| -7.0900| 32
7000_CNE_lig1009_cl_0.5| -7.4600| 22
7000_CNE_lig1023_cl_0.5| -7.8700| 25
7000_CNE_lig1032_cl_0.5| -7.1200| 20
7000_CNE_lig1033_cl_0.5| -7.4400| 26
7000_CNE_lig118_cl_0.5| -7.4400| 11
7000_CNE_lig179_cl_0.5| -7.8000| 26
7000_CNE_lig180_cl_0.5| -7.3800| 38
./tmpand now you have/Users/gleb/Desktop/DOcking/clusterizator/tmpmaking all answers obsolete. Which one is it? What input are you running thesort -t'|' -nk2,2command on? It can't be on the file you show, the output has no/Users...so you must have done something else. We cannot help you if you don't explain what you are doing.sed 's/| */|/g' file.csv | sort -nk2,2? That will remove the spaces after the|.