$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
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
non-search links
script macro