I'm trying to merge or not repeat the lines in an output using bash but don't want to grep for it. I'm not sure how to do it. I'm trying to do this in Linux:
Before:
113.171.10.13
113.171.10.13
113.171.10.13
113.171.10.13
23.253.228.76
23.253.228.76
23.253.228.76
23.253.228.76
23.253.228.76
23.253.228.76
After:
113.171.10.13
23.253.228.76
Any help is appreciated!
Thanks!
Use unique sort, outputing only the first of an equal run:
sort -u
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With