for i in {2..x}; do awk -v a="$i" 'BEGIN{RS=">"; tem="tmp"} NR==a{print a"n";print ">"$0 >tem; exit}' genome.fas ; genscan your.smat tmp >>genscan_sh.out; rm tmp; done
dirty version of my script to run it.
note: 'x' in for loop is the number of fasta entry +1 . I