$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
 
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 2008-09-06.   This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.   Copyright © 1998-2008 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
HTML text
appearance
macros