Syntax:

-stats var1,var2,... stats1,stats2,...

Example 1.
$ ./vartools -i EXAMPLES/3 \
    -oneline \
    -expr 'mag2=mag+0.01*gauss()' \
    -stats mag,mag2 \
        mean,weightedmean,median,stddev,meddev,medmeddev,MAD,kurtosis,skewness,pct10,pct20,pct80,pct90,max,min,sum

Name                      = EXAMPLES/3
STATS_mag_MEAN_1          = 10.166743412350014
STATS_mag_WEIGHTEDMEAN_1  = 10.166840511593556
STATS_mag_MEDIAN_1        = 10.16667
STATS_mag_STDDEV_1        = 0.0048962905656505414
STATS_mag_MEDDEV_1        = 0.0048968410484820256
STATS_mag_MEDMEDDEV_1     = 0.0028399999999990655
STATS_mag_MAD_1           = 0.0042117199999986143
STATS_mag_KURTOSIS_1      = 4.9829879483793551
STATS_mag_SKEWNESS_1      = 0.14038267441188684
STATS_mag_PCT10.00_1      = 10.160913997073457
STATS_mag_PCT20.00_1      = 10.16311
STATS_mag_PCT80.00_1      = 10.17027
STATS_mag_PCT90.00_1      = 10.17229
STATS_mag_MAX_1           = 10.1921
STATS_mag_MIN_1           = 10.141400000000001
STATS_mag_SUM_1           = 34739.762240000011
STATS_mag2_MEAN_1         = 10.166882723132543
STATS_mag2_WEIGHTEDMEAN_1 = 10.166911774719013
STATS_mag2_MEDIAN_1       = 10.166930994622186
STATS_mag2_STDDEV_1       = 0.011231063371529714
STATS_mag2_MEDDEV_1       = 0.01123116713766441
STATS_mag2_MEDMEDDEV_1    = 0.0076167519498877567
STATS_mag2_MAD_1          = 0.011295643141683544
STATS_mag2_KURTOSIS_1     = 2.9418272242167212
STATS_mag2_SKEWNESS_1     = 0.0011949294760513268
STATS_mag2_PCT10.00_1     = 10.152331106293966
STATS_mag2_PCT20.00_1     = 10.157470460834842
STATS_mag2_PCT80.00_1     = 10.176449326746956
STATS_mag2_PCT90.00_1     = 10.18135943317764
STATS_mag2_MAX_1          = 10.208880822707791
STATS_mag2_MIN_1          = 10.129160734154709
STATS_mag2_SUM_1          = 34740.23826494391

Calculate a variety of statistics for the magnitudes in a light curve, and for the magnitudes after adding gaussian noise to them. The call to -expr defines a new vector mag2 which is equal to mag with some gaussian noise added. In the call to stats we first tell it which variables to compute the statistics for (mag and mag2), we then give the statistics to compute. Note that the pct## statistics are percentiles (in this case the 10th, 20th, 80th and 90th percentiles).