start getopts
match command line option
get totals if -t
tidy