for i in $(grep -i ^backend haproxy.cfg |awk '{ print $2 }'); do echo if \( \$msg contains \"$i\" \) then \{; echo action\(type=\"omfile\" file=\"/var/log/haproxy-$i.log\" flushOnTXEnd=\"off\"\); echo stop ; echo \}; done