This is great, and I accepted it, but I've got one other question. I'm now trying to add my filepath and suffix back onto the output and am having difficulty.
echo "$DIR"/${TODO}_R1_001.fastq.gz
produces:
/Users/michaelflower/Desktop/JL_MSH3/MF3-130CAGiPSC-BL-20210521_S2_L001 MF4-JL180CAG-NPC1-20211211_S4_L001 MF5-JL180CAG-NPCp22-20211211_S1_L001_R1_001.fastq.gz
But what I want is the filepath and suffix added to each filename! I want to use this as the input to a function to list the files it needs to operate on