#! /bin/bash
sh-cmd1
....
sh-cmdn
##################
expect <<\EOF
expect-cmd1
.......
expect-cmdn
EOF
##################
sh-cmdo
.......
sh-cmdp
##################
expect <<\EOF
expect-cmdr
.......
expect-cmds
EOF
##################

................