Considering the following input file (example)...
afaefkl aaa
al kmm ddd
aajwoe bbb
bnm aefp ccc
... what would be the most straight-forward way to sort it by column 2 (starting at character position 12 in each line) using standard Unix/Linux tools only?
Note that the whitespace consists of spaces only, there are no tabs, so sort -k2
fails for obvious reasons.
The expected output would be as follows:
afaefkl aaa
aajwoe bbb
bnm aefp ccc
al kmm ddd