gunzip
一連のファイルを作成し、出力を Python スクリプトにリダイレクトします。Python スクリプトは、入力として 1 つの引数を取得します。次のコマンドを書きました。
for i in $(ls test5/*/*gz); do gunzip -c $i | python script.py ; done
しかし、それは私に次のエラーを与えます:
Traceback (most recent call last):
File "./fqtofa.py", line 7, in <module>
inFile = sys.argv[1]
IndexError: list index out of range
なぜgunzip
出力から読み取れないのだろうか。