in reply to Make this simpler?

Here's one more snippet:
from the command line just run
perl -ne 'print grep /^>/, $_' sample*