1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/bash outfile=$RSYSLOG_OUT_LOG echo "Starting with parameters: $@" >> $outfile read log_line while [[ -n "$log_line" ]]; do echo "Received $log_line" >> $outfile read log_line done echo "Terminating normally" >> $outfile exit 0