So, I have a directory:

Pipeline

 - database: contains the custom blast database
 - scripts
 - genomes
 - output

I want my local blast.sh script ( in the script folder) to take all the *.fna of the genomes folder and put results in the output folder.

So i specified the following:

    for F in ../genomes/*.fna
    do
    	blastn -query  $F -db ../database/blastdb/dbGOI.fasta -outfmt 5 -out ../output/${F%.*}.xml
    done

But when I run this, all of my output .xml files are in the genome folder and I do not know why since I specified that in the code.

Am I missing something?

So, since that seemed to be a bug, I used the following workaround:

    blastn -query  $F -db ../database/blastdb/dbGOI.fasta -outfmt 5 >> ../output/results.xml

since I used cat to put all theoutput files together, I save a line of code.

