MrDataMan
New Contributor II

Didn't solve the issue with this example but I figured out how to specify the location where the unzipped files are saved using an unzipping library.

I used gunzip to unzip my own gzip files like this:

 

for file in "$SOURCE_DIR"/*.gz; do
echo "Unzipping $file..."
gunzip -c "$file" > "$TARGET_DIR/$(basename "$file" .gz)"
rm "$file" # Delete the original .gz file
done