I'm working on a script that I'm going to run as a daily scheduled task. The script creates a htm-file with information from several servers. Among other things, I want to list error logs for the last 7 days from servers listed in $servers.
My case is this. When I run the following command, it's all good, and it gives me the logs I'm asking for: