In case this is useful to anyone:
gunzip takes a list of files on its command line and replaces each file
whose name ends with .gz, -gz, .z, -z, or
z (ignoring case) and which
begins with the correct magic number with an uncompressed file without
the original extension.
root@tvr:/home/hts/.xmltv# gunzip -f /home/hts/.xmltv/tvgrab_file.gz /home/hts/.xmltv/tv_grab_file.xmltv
gzip: /home/hts/.xmltv/tv_grab_file.xmltv.gz: No such file or directory
The above error is happening because you're telling gunzip to decompress tv_grab_file.xmltv which doesn't exist.
What you want is:
gunzip -f /home/hts/.xmltv/tv_grab_file.gz
mv /home/hts/.xmltv/tv_grab_file /home/hts/.xmltv/tv_grab_file.xmltv
Alternately, this would work too:
gunzip -fc /home/hts/.xmltv/tv_grab_file.gz > /home/hts/.xmltv/tv_grab_file.xmltv
And finally, why not just name the file properly in the 1st place? tv_grab_file.xmltv.gz will unzip to tv_grab_file.xmltv
Also a note regarding escaping URLs for wget, much simpler just to put the URL in single quotes, so what you really want is:
XMLTV=/home/hts/.xmltv
wget -O $XMLTV/tv_grab_file.xmltv.gz 'COPY-AND-PAST-LINK-FROM-EMAIL-HERE'
gunzip -f $XMLTV/tv_grab_file.xmltv.gz
Set XMLTV to the appropriate path & you're good to go.
John Jones:
The path you've given is the path to the TVHeadend epggrab socket, which is a different beast entirely. You can use that if
tv_grab_file doesn't work. You'll need 'socat' for that.
e.g. In your case that would be:
TVHSOCK=/volume1/@appstore/tvheadend-testing/var/epggrab/xmltv.sock
XMLTV=/home/hts/.xmltv # Set this path according to your setup
XMLFILE=$XMLTV/tv_grab_file.xmltv
wget -O $XMLFILE.gz 'COPY-AND-PAST-LINK-FROM-EMAIL-HERE'
gunzip -f XMLFILE.gz
cat $XMLFILE | socat - UNIX-CONNECT:$TVHSOCK