title: Pass comand line parameters to shell script via omprog (rsyslog module)
body: <p>Having bad times with passing system log message to shell script as command line parameter via rsyslog module omprog.  </p>
  
  <p>My /etc/rsyslog.conf:  </p>
  
  <pre><code>module(load="omprog")
  if $syslogtag contains 'user'
  then action(type="omprog" binary="/usr/bin/test")
  </code></pre>
  
  <p>My /usr/bin/test:  </p>
  
  <pre><code>#!/bin/sh
  printf "\n$(date): $1" &gt;&gt; /home/user/sink
  </code></pre>
  
  <p>On running </p>
  
  <pre><code>logger qqq
  </code></pre>
  
  <p>I get 'qqq' in /var/log/messages and current timestamp in /home/user/sink.<br>
  Upon running</p>
  
  <pre><code>/usr/bin/test some_message
  </code></pre>
  
  <p>I get in /home/user/sink current timestamp along with 'some_message'. But as soon as I modify action string in /etc/rsyslog.conf to<br>
  either</p>
  
  <pre><code>then action(type="omprog" binary="/usr/bin/test some_message")
  </code></pre>
  
  <p>or</p>
  
  <pre><code>then action(type="omprog" binary="/usr/bin/test \"$msg\"")
  </code></pre>
  
  <p>I get logger parameter in system log, but nothing in /home/user/sink.
  Stuck on that issue for whole day already, any help is highly appreciated.</p>