You can do something like that (if you are sue that lines start only with H or S) :
Code:
$ cat lseq.txt
H0102.........
SLSC10299......
H0103.........
H0104.........
SLSC10299......
SLSC10299......
H0104.........
SLSC10299......
$ awk -v seq=x '$0 !~ "^" seq { print; seq=substr($0,1,1) }' lseq.txt
H0102.........
SLSC10299......
H0103.........
SLSC10299......
H0104.........
SLSC10299......
$
Another way :
Code:
$ awk -v seq=S '
seq=="H" && /^S/ { print; seq="S"; next }
seq=="S" && /^H/ { print; seq="H"; next }
' lseq.txt
H0102.........
SLSC10299......
H0103.........
SLSC10299......
H0104.........
SLSC10299......
$