11 lines
193 B
Bash
11 lines
193 B
Bash
#!/usr/bin/env bash
|
|
|
|
paste -s -d '' input.txt |
|
|
perl -lne '
|
|
print "$1$4$2$3"
|
|
while
|
|
/(?<=(.).)(?<=(.).{138})A(?=.{138}(.))(?=.(.))/g
|
|
' |
|
|
grep -Eo '(SM|MS){2}' |
|
|
wc -l
|