When I tried to use this command sort -u -k5 input , it is disturbing other columns as well
All the columns should be sorted based on the 5th column but its not happening .
Split the records with a blank line, using a digit on the first position as the indicator of a new record
Replace the line terminators of records with an obscure character (paragraph character was used here (§), but it could be any character as long as it is not used in the input file) and remove the empty line that was introduced in step 1
Numeric reverse sort of the records on the 5th field
Reassemble the records to their original state by replacing the obscure character by a newline
Thanks for the code , but could you tell me what is the operator which is being used ,for is it $ for OFS ?
Could you help me out in brief explanation ?
Thank you S. So you mean sort command's stable utility is not supported by all O.S systems. Sorry I only run it on a online terminal which has a GNU sort, not sure about any other O.S systems,if any details you want me to add then feel free to let me know I will add it in my answer then, cheers.