Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Loop over with all files in a directory in bash

  • Public
By Jit 2535 days ago
#!/bin/bash FILES=/media/ComparativeGenomics/ncbi-genomes-2017-11-13/* ref=/media/ComparativeGenomics/ncbi-genomes-2017-11-13/GCA_000196735.1_ASM19673v1_genomic.fna path=/home/urbe/Tools/SATSUMA/satsuma-code-0 for f in $FILES do if [ ${f: -4} == ".fna" ]; then echo "Processing $f file..." ff=$(basename "${f%.*}") echo $ff # take action on each file. $f store current file name mkdir $ff $path/SatsumaSynteny -q $ref -t $f -o $ff #cat $f fi done