Perhaps you should be using system to execute the call to gzip, rather than backticks. If you are not interested in the STDOUT from the call (which is returned by using backticks), system will execute the call, and return the exit code of the executed process. See system
In reply to Re: gzip command always returns -1
by JediWizard
in thread gzip command always returns -1
by jyoshv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |