$dirname()
DESCRIPTION
returns a filepath's directory portion, without the terminating filename
SYNOPSIS
$dirname(s)
ARGUMENTS
s - a quoted string, or string expression, representing a filepath
EXAMPLES
# pikt +C 'output $dirname("/usr/local/bin/snmpget")'
/usr/local/bin
init
...
input proc "=find /usr -mtime -1"
dat $filepath 1
rule
set $dir = $dirname($filepath)
rule
set $dir = $dirname($filepath)
rule
=outputproc(mail, "=find $dir -mtime +30 -exec =lld {} \\\\;")
SEE ALSO
$basename()
String Functions
Numerical Functions