나는 일반적인 일을 하고 있지만 sort -n
이번에는 다음과 같은 입력 목록에서 작동하지 않습니다. 부분적으로 유사합니다.
./firedock-output_308.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 54.06
./firedock-output_286.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 17.91
./firedock-output_26.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 18.86
./firedock-output_7.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 24.29
./firedock-output_843.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 17.88
./firedock-output_115.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 142.42
그 이후의 출력은 다음 sort -k1,1n
과 같습니다.
./firedock-output_1000.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 95.86
./firedock-output_100.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 12.62
./firedock-output_101.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 33.89
./firedock-output_102.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 19.83
./firedock-output_103.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 19.69
./firedock-output_104.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 69.43
./firedock-output_105.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 25.11
./firedock-output_106.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 17.46
./firedock-output_107.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 41.77
./firedock-output_108.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 12.61
./firedock-output_109.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 72.75
./firedock-output_10.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 67.79
./firedock-output_110.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 13.87
./firedock-output_111.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 18.44
./firedock-output_112.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 27.03
./firedock-output_113.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 37.43
./firedock-output_114.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 18.57
./firedock-output_115.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 142.42
./firedock-output_116.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 57.75
./firedock-output_117.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 21.21
이 경우 왜 sort -n
정상적으로 작동하지 않습니까(예: 숫자 순서에 따라 정렬)?
내가 원하는 건
./firedock-output_1.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 12.62
./firedock-output_2.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 12.62
./firedock-output_3.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 12.62
./firedock-output_4.ref_clashscore_cat_elmo1-NT_rhog1_clashscore:clashscore = 12.62
최대 1000개(총 1000개 행).
감사해요.
답변1
알겠습니다. 해결되었습니다. 19번째 문자인 정렬 키의 위치를 지정해야 합니다.
sort -n -k1.19
감사합니다!