I want to gunzip
a series of files and then redirect the output to my python script. The python script gets one argument as the input. I wrote the following command:
for i in $(ls test5/*/*gz); do gunzip -c $i | python script.py ; done
But it gives me the following error:
Traceback (most recent call last):
File "./fqtofa.py", line 7, in <module>
inFile = sys.argv[1]
IndexError: list index out of range
I wonder why it can't read from the gunzip
output.