I've tried to find the existing topics about this theme and I found something but it's not the 100% what I'm looking for and my internet connection is bad last few days so I needed to quit searching and post a new thread...
So my problem is I have a .txt file with many lines (over 50000), every line has 5 letter string like this:
KKIUB
SDCVG
KJUTT
NGTHH
WWLEE
XGHTP
NJFRT
PPSFF
ZZZLP
XDRFX
JJJJJ
KIEYW
...
I want all lines in a file that contain two (or more) same letters to be deleted. The order of duplicates isn't important, so all lines that contain a letter two times in a line must be deleted. Please note that sometimes there can be all 5 same letters, sometimes 3 same letters, sometimes only 2 same letters + not close to each other, e.g "GOHIG".
KKIUB ---> delete
SDCVG ---> stays
KJUTT ---> delete
NGTHH ---> delete
WWLEE ---> delete
XGHTP ---> stays
NJFRT ---> stays
PPSFF ---> delete
ZZZLP ---> delete
XDRFX ---> delete
JJJJJ ---> delete
KIEYW ---> stays
I'm trying with sed
function but was not able to have good results. Also I would like to export it into another .txt file. Any help?