dir/with/files$ ls -A | xargs head -qn 30 | perl -Mstrict -wne 'if( $_ =~ /(make)|(model)|(year)/ ) { print "$_"; }' > youtoutfile.txt