Permalink
Find file Copy path
61d3132 Jul 9, 2011
1 contributor

Users who have contributed to this file

executable file 11 lines (7 sloc) 241 Bytes
#!/bin/sh
if [[ "$1" == "" || "$2" == "" ]]; then
echo "usage: $0 [ledger file] [database name]"
exit 1
fi
ledger -f $1 csv | psql -c "delete from ledger; copy ledger from stdin with csv; analyze ledger;" $2
psql -f ledger.sql $2