Skip to content

Instantly share code, notes, and snippets.

@dberkholz
Created January 11, 2016 20:55
Show Gist options
  • Save dberkholz/e5320c65b09b7932c949 to your computer and use it in GitHub Desktop.
Save dberkholz/e5320c65b09b7932c949 to your computer and use it in GitHub Desktop.
#!/bin/bash
for file in */*xls; do
echo ${file#*/}
in2csv --sheet 'Expense Report' $file \
| awk -F, '{if ($5 == "Mileage") {printf "%d\t%.2f\t%s (%.2f mi @ $0.56/mi)\n", $1, $6, $4, $6/0.56 }}'
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment