[Trisquel-users] Re : Sort and Uniq fail to remove all duplicates from a list of hostnames and their IPv4 addresses

2019-02-17 Thread lcerf
Sort -u by itself had no effect on the file size. If you give 'sort' a text file in argument, it will not be modified, if that is what you mean. It is how all text-processing command work (well, 'sed' actually has an --in-place option): you must redirect their output to a file (or use the

[Trisquel-users] Re : Sort and Uniq fail to remove all duplicates from a list of hostnames and their IPv4 addresses

2019-02-15 Thread lcerf
'sort -u' does remove all duplicates. What you consider duplicates in its output must differ in some subtle way, e.g., an additional space at the end of the line. Those differences can be ironed out. For instance, that command "squeezes" the spaces (only leaves one if there are more) in

[Trisquel-users] Re : Sort and Uniq fail to remove all duplicates from a list of hostnames and their IPv4 addresses

2019-02-14 Thread lcerf
You want 'sort -u', which is faster that 'sort | uniq' in presence of many duplicates.