Can someone please help me count the number of reads in fastq file with 3' terminal bases? For example, I need to get the account of reads ending with A, T, G and C in any input.fastq
I like the `seqtk` version. You can also use a combination of native commands like `sed`, `rev`, and `cut` to accomplish the same thing and it's easier on the eyes.

    sed -n '2~4p' input.fq | rev | cut -c1 | sort | uniq -c

`sort | uniq -c` is decent for low millions of lines. If your file is large, `awk` or `mawk` is generally preferred. You can replace it with `awk '{ cts[$0] += 1 } END { for (v in cts) print cts[v], v }'` and it'll save you quite a bit of time. If your file is really large, the `seqtk` version should be the fastest. 

To use `awk` or `mawk` for sort unique, you can save it as an alias.

    alias sortuniq="awk '{ cts[\$0] += 1 } END { for (v in cts) print cts[v], v }'"

