'Sort' command #6 Discussions | Linux Shell | HackerRank
  • + 0 comments
    sort -t $'\t' -k2n
    

    -t$'\t': This option specifies that the field separator should be a tab character\t. The$'\t' syntax is a Bash feature that allows you to represent special characters, such as tabs, in a way that the shell can understand.

    -k2n: This option tells sort to sort the file based on the numeric value of the second column. The 2 specifies the column number, and the n tells sort to sort the column numerically.