(05-28-2012, 06:43 AM)M@LIK Wrote: @Pixel:: I believe this is what you want:
Code:A BUG found!
I don't what you people trying to do...
I'm just the scripting guy!! xD
EDiT:
"A BUG found!"
Try this one:
Code:sed "/\(.\)\1\1/d;/\(.\).*\1.*\1/d;/\(.\).*\1.*\(.\).*\2/d;/\(.\).*\(.\).*\1.*\2/d"
That was quick, you are a sed scripting god M@LIK Thanks
M@LIK, it not working as I'd hoped
Code:
AABACDEF
AABACDEG
AABACDEH
AABACDEI
AABACDEJ
AABACDEK
breaks this rule
No more than 2 of any character within a single line
Edit: I got it working but can't be sure as I don't understand the command at all but notice you added
Code:
/\(.\).*\1.*\(.\).*\2/d
and
Code:
/\(.\).*\(.\).*\1.*\2/d
so I remove one of them. The command I using that seems to work is
Code:
sed "/\(.\)\1\1/d;/\(.\).*\1.*\1/d;/\(.\).*\1.*\(.\).*\2/d"
and output is
Code:
AABCDEFG
AABCDEFH
AABCDEFI
AABCDEFJ
AABCDEFK
AABCDEFL
these extra commands have slowed it down even more lol, shame they is no GPU version of sed or even a mulit-core version