Try to make a single line to syslog.

Hi again:

Following the thread:

I couldn't solve my problem, so I ask you again gurus:

I have this code:

nohup /usr/sbin/auditstream | /usr/sbin/auditselect -m -e "event== S_ENVIRON_WRITE || event== USER_Create || event== USER_Remove || event== USER_Change || event== GROUP_Create || event== GROUP_Remove || event== GROUP_Change || event== PASSWORD_Change" | /usr/sbin/auditpr -h elrtRc -t0 -v &

which makes the output:

USER_Create     user user  OK          mkuser             
                     israel
USER_Remove   user user  OK          mkuser             
                     israel

BUT I want to get this output (all on a single line) and I'm not able to do it:

USER_Create     user user  OK          mkuser                        israel
USER_Remove   user user  OK          mkuser                        israel

Can you help me to get the desired output?
Thanks once more.

Thanks

Have you tried the sed command of Scrutinizer?

sed 'N;s/\n//' file

Use it like:

<your commands> | sed 'N;s/\n//' &

Yes, but there's no output to syslog, I forgot to add logger command at the end of the code:

nohup /usr/sbin/auditstream | /usr/sbin/auditselect -m -e "event== S_ENVIRON_WRITE || event== USER_Create || event== USER_Remove || event== USER_Change || event== GROUP_Create || event== GROUP_Remove || event== GROUP_Change || event== PASSWORD_Change" | /usr/sbin/auditpr -h elrtRc -t0 -v| sed 'N;s/\n//'   |logger -p local0.info -t AUDITALERT &

If cat the out from a file, sed works perfectly, but on this chain of code doesn't

I mean, works until the sed command, but no output on the logger command :frowning:
Thanks