Skip to content
Advertisement

sort lines of a file alphanumerically

I have a text file in linux. I want to sort each line w.r.t. other line alphanumerically. Linux sort command ‘sort ‘ does not sort alphanumerically. File is not column based. Specifically I want below two files to match in diff comparison but I am unable to do so. Can you help? First file content is

JavaScript

Second file content is

JavaScript

Advertisement

Answer

It’s better to do sort in the program that is generating this output.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement