$lpcmd()
(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 lpcmd
SYNOPSIS
$lpcmd()
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 LpcmdTest
LpcmdTest
init
status active
level info
task "this is a test of \$lpcmd()"
begin
output $alert()
output $alarm()
output $lpcmd()
# /pikt/bin/pikt -T +M "/bin/mailx -a 'From: piktadmin' -s 'PIKT Alert on hamburg: Test' berto\" +L "/usr/bin/lp lp" +A Test Test LpcmdTest /usr/bin/lp lp
rule
if $lpcmd() ne $nil()
output print "[some message]"
else
output piktlog "[some message]"
fi
SEE ALSO $alert() $alarm() $level() $status() $task() $mailcmd() String Functions Numerical Functions