I used the sort command to numerically sort file1.txt.
~]# sort -n -o file1.txt file1.txt 0 Barack 50 George 60 Ronald 100 Bill
The sort check command states the file is not sorted.
~]# sort -c file1.txt sort: file1.txt:4: disorder: 100 Bill
I manually modify the file and place "100 Bill" second.
~]# cat file1.txt 0 Barack 100 Bill 50 George 60 Ronald
Now, the sort check command produces no stdout or stderr, meaning the file is properly sorted. Once properly sorted, I can now join the files. It seems that the first character is being used to know if the file is sorted instead of the entire integer.
sort -c file1.txt
Is there a way to sort the file so that "100 Bill" is on line 2? I cannot do this manually, as the real application of this issue deals with hundreds of lines of text processed by a daily job.