Thank you for your answer
I still have same problem (writing "Subjet:" line to a file)
Now I can capture Subject line but when I try to write a file script return me error.
echo ${ln/#Subject: /} >> /var/log/monitoring/messages_log
For exaple if I change this line it's OK but not in this case doesn't write Subject: line a file """ >> /var/log/monitoring/messages_log"""
echo ${ln/#Subject: /} | .........
>Hi All
>I have configured bb_event_generator.cfg if some ALARM accour to execute this scipt. Bigsister starts this scipt but script cannot take SUBJECT from bigsister.
>My idea is to capture only Subjet line from alert message and write them in a file
>
>bb_event_generator.cfg
>*.* prio=90 down=red up=green delay=0 \
> check=1 norepeat=5 \
> keep=1 pager=/usr/bin/write_log.sh mail=parameters \
> repeatprio=10 msgmax=150 maxpermin=20
>
>write_log.sh
>#!/bin/sh
> ln=empty
> until [ "`echo "$ln" |sed -n -e "/^Subject: /p"`" != "" ]
> do
> read ln
> done
>echo ${ln/#Subject: /} >> /var/log/monitoring/messages_log
-----------------------------------------------------------------
Всички гледат! Гледай и ти! www.neterra.tv/bg
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bigsister-general mailing list
suppressed
https://lists.sourceforge.net/lists/listinfo/bigsister-general
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.