sort by column linux code example
Example 1: bash sort by column
sort -k2 -n yourfile
Example 2: sorting output bash
# Use sort command
input_text | sort
# or
input_text | sort -r
# For reverse
sort -k2 -n yourfile
# Use sort command
input_text | sort
# or
input_text | sort -r
# For reverse