I have a FASTQ dataset where I'm trying to find the average base quality score.  I found this old link that helped somewhat (https://www.biostars.org/p/47751/).

Here is my script (I'm trying to stick to awk, bioawk or python):

    bioawk -c fastx '{print ">"$name; print meanqual($qual)}' XXX.cln.fastq.gz

I was expecting a single average output for the entire set, instead I got a huge dump of data with many rows looking like this:

        >FCD23GWACXX:2:1101:3183:2494
    36.45

I assume that the 36.45 is my average phred quality score for that sequence?  I was hoping for an average score for the entire file.  Could such a script be written?
bioawk is to some extent still awk based (though with -c you get a diff read mode, as in 'per entry' rather then 'per line').
You can easily extent this cmdline to get the desired result:

    bioawk -c fastx '{print ">"$name; print meanqual($qual)}' XXX.cln.fastq.gz | paste - - | awk '{sum += $3} END {print sum/NR}'

should do the trick