Thanks! That worked. I just had to add a | to make blat email out the output file with a line break, too bad it actually adds the | to the line. The script is running like a charm.