How to sort a data in txt file?
I have generated txt file. How to sort the lines in it by first number before `|` ?

It have structure like:

    1|5
    4|7
    2|3
    3|1
How to sort a data in txt file?
===

I have generated txt file. How to sort the lines in it by first number before `|` ?

It have structure like:

    1|5
    4|7
    2|3
    3|1