Untitled
#!/bin/bash touch genecounts1.txt while read id start stop mid gene; do count=$(grep -w $mid simple.counts.1.txt | awk '{print $2}') if [[ "$count" == "" ]] ; then count=0 fi echo -e "$count\t $gene" >> genecounts1.txt done < Bthuringiensis_gene_map.txt