Syntax:

-if <expression> [-command1 ... -commandN] [-elif <expression> [-command1 ... -commandN]] ... [-elif <expression> [-command1 ... -commandN]] [-else [-command1 ... -commandN]] -fi

Example 1.
$ ./vartools -l EXAMPLES/lc_list -rms \
    -if 'RMS_0>10*Expected_RMS_0' \
        -if 'RMS_0 > 0.1' \
            -stats mag stddev \
        -else \
            -stats mag pct30 \
        -fi \
    -elif 'Npoints_0>3900' \
        -stats mag kurtosis \
    -else \
        -rms \
    -fi \
    -header

#Name Mean_Mag_0 RMS_0 Expected_RMS_0 Npoints_0 STATS_mag_STDDEV_3 STATS_mag_PCT30.00_5 STATS_mag_KURTOSIS_8 Mean_Mag_10 RMS_10 Expected_RMS_10 Npoints_10
EXAMPLES/1  10.24745   0.15944   0.00101  3122 0.15946976931434603 0 0   0.00000   0.00000   0.00000     0
EXAMPLES/2  10.11802   0.03663   0.00102  3313 0 10.0855 0   0.00000   0.00000   0.00000     0
EXAMPLES/3  10.16674   0.00490   0.00104  3417 0 0 0  10.16674   0.00490   0.00104  3417
EXAMPLES/4  10.35142   0.00209   0.00114  3227 0 0 0  10.35142   0.00209   0.00114  3227
EXAMPLES/5  10.43962   0.00288   0.00114  3903 0 0 4.3605470261901687   0.00000   0.00000   0.00000     0
EXAMPLES/6  10.52762   0.00209   0.00121  3933 0 0 4.0802664679027298   0.00000   0.00000   0.00000     0
EXAMPLES/7  10.56966   0.00349   0.00116  3626 0 0 0  10.56966   0.00349   0.00116  3626
EXAMPLES/8  10.61152   0.00225   0.00125  3957 0 0 3.3159700561447285   0.00000   0.00000   0.00000     0
EXAMPLES/9  10.73139   0.00187   0.00133  3954 0 0 6.745669809252357   0.00000   0.00000   0.00000     0
EXAMPLES/10  10.87781   0.00236   0.00143  3974 0 0 4.0178189593727724   0.00000   0.00000   0.00000     0

Example illustrating the use of an -if, -elif, -else, -fi construct. Here we compute the -rms of light curves given in the file EXAMPLES/lc_list. Subsequent processing depends on the values returned by -rms. Note the use of nested -if statements.