Skip to main content
2 of 3
deleted 398 characters in body
Yurko
  • 738
  • 3
  • 4

UPDATED according to changed task.

File file1 with your data created:

$ cat file1
1    10  11
10   200 201
2    20   21
22   2000 2001

Now we sort the file lines and write results to file2:

$ cat file1|sort -n > file2

Or we can even simplify it:

sort -n file1 > file2

Checking the results in file2:

$ cat file2
1    10  11
2    20   21
10   200 201
22   2000 2001
Yurko
  • 738
  • 3
  • 4