$mailcmd()
(NOTE: Some of the techniques shown or described on this page--marked in purple--require new features in the latest official PIKT 1.19.0 release (pikt-current.tar.gz) that are unavailable in any previous version.)
DESCRIPTION
returns the current alert's mailcmd
SYNOPSIS
$mailcmd()
ARGUMENTS
none
EXAMPLES
Test
timing =piktnever
mailcmd "=mailx -a 'From: piktadmin' -s 'PIKT Alert on =pikthostname: Test' =pikt-test"
lpcmd "=lp =piktprinter"
status testing
level debug
alarms MailcmdTest
MailcmdTest
init
status active
level info
task "this is a test of \$mailcmd()"
begin
output $alert()
output $alarm()
output $mailcmd()
# /pikt/bin/pikt -T +M "/bin/mailx -a 'From: piktadmin' -s 'PIKT Alert on hamburg: Test' berto\@acme.com" +L "/usr/bin/lp lp" +A Test Test MailcmdTest /bin/mailx -a 'From: piktadmin' -s 'PIKT Alert on hamburg: Test' berto\@acme.com
rule
if $mailcmd() !~ "tom|dick|harry"
output mail "[some message]"
else
output piktlog "[some message]"
fi
SEE ALSO
$alert()
$alarm()
$level()
$status()
$task()
$lpcmd()
String Functions
Numerical Functions