I would like to edit the headers on all my FASTQ files so that the header would be the name of the file with a number to the end that would act a sequence counter. So the headers for the reads in a file named test would be test_1, test_2, test_3, and so on.
You should look into bioawk (https://github.com/lh3/bioawk) - I think it will allow you to access these variables (file name, record number i.e. ordinal number of each read) in a streamlined way.
Hi! Please consider reformatting your question to be more readable.
Have you seen Quick One Liner For Fastq Header Renaming post? I think you can very much adapt the awk solution suggested there, and slightly modify it so that the name of your file is used. Something like this (not tested):
You should look into
bioawk
(https://github.com/lh3/bioawk) - I think it will allow you to access these variables (file name, record number i.e. ordinal number of each read) in a streamlined way.