Why is it when I leave the following tailf running:
tailf /var/log/z-way-server.log | grep --line-buffered device-info | gawk 'BEGIN { FS = "\"" } ; {print $4,"is",$8}'
I get my desired output:
Den Window Sensor is off
However, when I want this passed as a parameter to a script (which uses $1 within the script):
./message.sh $(tailf /var/log/z-way-server.log | grep --line-buffered device-info | gawk 'BEGIN { FS = "\"" } ; {print $4,"is",$8}')
It never passes the message as desired? For clarification, message.sh Test
would post the word "Test" to a Slack channel.