Skip to content

Instantly share code, notes, and snippets.

@rblaze
Created November 8, 2023 19:12
Show Gist options
  • Save rblaze/da2daa03f749fd357e19bae001a0de88 to your computer and use it in GitHub Desktop.
Save rblaze/da2daa03f749fd357e19bae001a0de88 to your computer and use it in GitHub Desktop.
(echo '"Date","Amount","Account Name"' ; tail -n +2 ~/Downloads/trends.csv | sed -e 's/January /01-/' -e 's/February /02-/' -e 's/March /03-/' -e 's/April /04-/' -e 's/May /05-/' -e 's/June /06-/' -e 's/July /07-/' -e 's/August /08-/' -e 's/September /09-/' -e 's/October /10-/' -e 's/November /11-/' -e 's/December /12-/' -e 's/"\(.*\)","\$\(.*\)",".*",".*"/"\1","\2","ACCOUNT_NAME_HERE"/' -e 's/^"\([0-9]\+\)-\([0-9]\+\)/"\2-\1-01/') > /tmp/balances.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment