sed regular expression to extract message part of the syslog (AIX):
#>sed 's/\(...\) \(..\) \(..\:..\:..\) \(.*\)/\4/' /var/adm/syslog
#>sed 's/\(...\) \(..\) \(..\:..\:..\) \(.*\)/\4/' /var/adm/syslog
myhost auth|security:err|error tsm: : 3004-025 - tcgetattr failed errno "25".
myhost auth|security:notice su: from dude to root at /dev/pts/109
myhost daemon:err|error root: Msg from Err Log: A924A5FC 0524165910 P S SYSPROC SOFTWARE PROGRAM ABNORMALLY TERMINATED
myhost daemon:err|error last message repeated 2 times
myhost user:info syslog: libtt[1224956]: _Tt_rpc_client::init(): fcntl(F_SETFD) failed for socket = 20
myhost user:info last message repeated 10 times
myhost user:info syslog: libtt[3125324]: _Tt_rpc_client::init(): fcntl(F_SETFD) failed for socket = 20
myhost user:info last message repeated 10 times
myhost auth|security:info sshd[946242]: Received disconnect from 127.0.0.1: 0:
myhost auth|security:info sshd[946178]: Accepted password for dude from 127.0.0.1 port 4341 ssh2
will print everything after the date and time of the syslog message which forms the main part of the syslog message. This is useful for generating reports of syslog (critical/error) etc.