for PAIR in \$(fastq | sed 's/_R.//g' | uniq)

• Welcome to Bioinformatics.StackExchange! I'd guess this error message is being generated by the sed command. But it looks like there are several potential problems with your shell command, the braces around variable names and the listing of the input files (the fastq | seq | uniq sequence) in particular. It doesn't look quite right, but to help you it would be helpful if you could give a bit more details about the names and locations of your input files. If there are many, 1 or 2 examples would suffice. – Daniel Standage Mar 22 '19 at 3:25