#and()
DESCRIPTION
returns TRUE if all of a series or logical values or expressions are TRUE (non-zero);
FALSE otherwise (if one or more logical values or expressions are FALSE or zero)
SYNOPSIS
#and(x1,x2,...)
ARGUMENTS
x1,x2,... - a series of logical values, or logical expressions, separated by commas
EXAMPLES
# pikt +C 'output $text(#and(2+2==4,#true(),#isalpha("foo")))'
1
# pikt +C 'output $text(#and(2+2==4,#true(),#isalpha("3")))'
0
server_reboot_period(D, H) #and((D)==1, (H)>=2, (H)<3)
if #and(#defined(%piktc_svccnt), #defined(%piktc_svcpid),
%piktc_svccnt == 1, #piktc_svcpid != %piktc_svcpid)
output mail "piktc_svc restarted on $sys"
endif
rule // bogus shell
if #and(! $shell eq "", ! -e $shell, ! #sysacct, $user !~ "^(=nobody)$")
output mail "User $user has nonexistent shell ($shell):"
output mail " $inline"
endif
SEE ALSO
#or()
#true()
#false()
#not()
#if()
Numerical Functions
String Functions