Skip to content

Instantly share code, notes, and snippets.

@mmh
Created September 22, 2013 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmh/6657197 to your computer and use it in GitHub Desktop.
Save mmh/6657197 to your computer and use it in GitHub Desktop.
iTunes total
total=0;for i in $(egrep -iho 'I alt: [0-9,.]*\ ?Kr|Order Total: [0-9,.]*\ ?Kr' *.eml | sed 's/,/./g' | grep -o [0-9.]*);do total=$(echo $total + $i| bc -l);done;echo $total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment