0

I am having problem looping over a sed command. I have multiple inputs defined in files.txt and those are used in the input and should be in the output filename as defines in $FILE

mapfile -s 1 -t files < files.txt
echo "${files[@]}"

for FILE in ${files[@]}; do

sed -n '/^>Gene-$FILE/{p;n;p}' mature.dna.fa > mature.dna.$FILE.fa;
done

files.txt

abu
gno
user2300940
  • 2,355
  • 1
  • 22
  • 35

0 Answers0