$trim()
DESCRIPTION
returns a string stripped of any leading and/or trailing whitespace (spaces or tabs)
SYNOPSIS
$trim(s)
ARGUMENTS
s - a quoted string, or string expression
EXAMPLES
# pikt +C 'output $trim(" turkey with all the trimmings ")'
turkey with all the trimmings
host2addr(H) // for the given host (H), return the associated addr (as
// resolved by nslookup)
// (H) is the host (e.g., hamburg.uppity.edu)
$trim($command("=nslookup -sil (H) 2>/dev/null | =grep '^Address:' |
=tail -n +2 |
=cut -d: -f2"))
rule
output mail $trim($inline)
rule // if exceeds threshold
if #la1 >= #lalim
=hourly(if #trunc(#la1) > #trunc(%la1)
output mail "uptime - $trim($inline)"
output mail =newline =toptop(1000) fi, )
fi
if #val($trim($command("=ls -1 $mount |
=egrep -v 'lost\\+found|TT_DB' |
=wc -l"))) > 1
...
SEE ALSO
$ltrim()
$rtrim()
$chop()
$middle(), $substring()
$left()
$right()
String Functions
Numerical Functions