I have several txt.gz files in a directory that I would like to decompress all in one go to a bunch of .txt files without getting rid of the originals. BUT I don't want them in standard output - as would be accomplished with the -c option. Rather I want them as files in the same directory, just with file.txt type name (as might be done with gunzip -c file.txt.gz > file.txt). Might anyone have any suggestions? Thanks!!
Use a simple for loop:
Note: This is bash syntax.
You can use p7zip instead of gunzip, it will keep your original archive files.
To decompress multiple files, see @mpy's answer.
As per @Dennis's comment, wrap wildcard with double quotation mark, p7zip will extract all