LIST1=($(cat Headers.txt)) LIST2=($(find /folder/with/fasta/files/ -maxdepth 0 -name "*CDS.fasta" | sort)) parallel --xapply sedinho {1} {2} ::: ${LIST1[@]} ::: ${LIST2[@]}