for example our input file **in.txt**:

```
naturalistic 10
coppering 20
artless 30

```

after command: **sort in.txt**

```
artless 30
coppering 20
naturalistic 10

```

after command: **sort -n -k 2 in.txt**

```
naturalistic 10
coppering 20
artless 30

```

My Question: How can I manage keeping the lines stable while sorting according to column.
I want to whole line stays same while its order in general is changing?
What algoritm or code piece is useful? Is it about file reading or sorting facility?