To view missing corrected fasta files in a folder:
ls -alth p*.cor.fa | awk '{print $9}' | cut -f 1 -d '.' | cut -d 'p' -f 2 | sort | awk 'BEGIN {nt = 1; et=1;} {while (nt != $1) {print nt; nt = nt+1;} nt=nt+1}'
To view them as blocks (for submission as SGE array jobs):
ls -alth p*.cor.fa | awk '{print $9}' | cut -f 1 -d '.' | cut -d 'p' -f 2 | sort | awk 'BEGIN {nt = 1; et=1;} {if (nt != $1) {print "starting=",nt;et=-1;} while (nt != $1) {nt = nt+1;} if (et<1) {et=nt-1; print "ending=",et;} nt=nt+1}'