Problem:

$ basename foo.fastq .fastq
foo
$ basename foo.FASTQ .fastq
foo.FASTQ