perl -pe"BEGIN{ $/='#### end of header'; <>}" mixed.dat > bin.dat