I scratched my head for a little bit why this script not worked for me, then I realised that somewhere my Unix style line endings were replaced with Windows style line endings (even when I checked Unix style in my editor - maybe at upload were converted by FTP program - I need to check this).
It is sneaky because it is difficult to find this error by first view and you just get empty output from grep command.
Grep in the code relies on Unix style line endings. I would recommend to add the following line to be sure we are working with Unix style line endings. To line 17:
I scratched my head for a little bit why this script not worked for me, then I realised that somewhere my Unix style line endings were replaced with Windows style line endings (even when I checked Unix style in my editor - maybe at upload were converted by FTP program - I need to check this).
It is sneaky because it is difficult to find this error by first view and you just get empty output from grep command.
Grep in the code relies on Unix style line endings. I would recommend to add the following line to be sure we are working with Unix style line endings. To line 17:
/usr/bin/dos2unix /etc/epgimport/FILTERpattern.txt
dos2unix is part of every installation.