Code:
$ cat file1
*Comment Frame 641 at 666.667 us
000000,CB1F,0,0,0,0,1,0,1
*Main End
$ sed -n -e '/\*Main End/{H;g;p;q;};h' file1
000000,CB1F,0,0,0,0,1,0,1
*Main End
$ sed -n -e '/\*Main End/{g;p;q;};h' file1
000000,CB1F,0,0,0,0,1,0,1
$
$
$
$
$
$ cat file2
000000,0000,0,0,2,0,0,0,0
*Comment Frame
5,7E3D,0,0,0,0,1,0,1
*Main End
$ sed -n -e '/\*Main End/{H;g;p;q;};h' file2
5,7E3D,0,0,0,0,1,0,1
*Main End
$ sed -n -e '/\*Main End/{g;p;q;};h' file2
5,7E3D,0,0,0,0,1,0,1
$