processing multiple fastq files with cutadapt
Try this one

for file in /dir/*
do
  cutadapt -g ACTTAAGTGTATGTAAACTTCCGACTTCAACTG "$file" &gt;&gt; results.out
done


Also you have omitted --discard-untrimmed from the original command. If you want that as well along with everything to run in parallel:

for file in /dir/*
do
  cutadapt -g ACTTAAGTGTATGTAAACTTCCGACTTCAACTG --discard-untrimmed "$file" -o "`basename -s .fastq $file`_out.fastq" &amp;
done