I need to uncompress a .gz file and store it in a variable, so I can use it later. So, the idea is that I generate *.fastq.gz files, and I need to uncompress them and keep just the *.fastq file. Then, I would like to store its name in a variable, so I can call the file for further processing.
Here, there is the code I am executing: input: $file.fastq.gz Where $file is the name of the file (it changes, as this code is inside a loop)
reads=$(gunzip $file.fastq)
echo $reads
Does anybody know what is wrong with this code? Why it does not produce any output and the program stays in that point? Thank you very much! ;)