Execution of compressed program

I need UNIX scripts for polling, Uncompressing files and moving files between directory. Also trying to save file paths and any other variables in an independent file (.env) and use these at runtime by executing this file in the main script.

What have you tried?

i have tried compression using tar but I don't know where the tape archive resides. Encountering error when i use gunzip. Polling program needs to continuously check for files which arrive and send them for decompressing it. i wrote a while loop for that. For saving file paths in .env format,i'm clueless.

Without seeing what you actually did, I cannot say why it didn't work.