From a6aa3755f9339cdd13894d7d80dd4e4bb150ae76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Mon, 9 May 2016 23:07:05 +0200 Subject: [PATCH] I will make you pay! --- gentrans.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 gentrans.sh diff --git a/gentrans.sh b/gentrans.sh new file mode 100755 index 0000000..7b80301 --- /dev/null +++ b/gentrans.sh @@ -0,0 +1,48 @@ +#!/bin/bash +amount=0 +date=`date +%Y-%m-%d` +account="" + +case $1 in +"fransk" ) + payee="Føtex Storcenter Nord Snacks" + amount="10,00" + to="Expenses:Snacks:Franske Hotdogs" + from="Assets:Checking" + ;; + +"nord" ) + payee="${2} Storcenter Nord" + amount="${3}" + to="Expenses:Snacks" + from="Assets:Checking" + ;; + +"pay" ) + payee="${2}" + amount="${3}" + to="Assets:Checking" + from="Assets:Reimbursements:${2}" + ;; + +"owe" ) + payee="${2}" + amount="${3}" + to="Assets:Reimbursements:${2}" + from="Assets:Checking" + ;; + + +"matk" ) + payee="Matematisk Kantine" + amount="${2}" + to="Expenses:Snacks:MatKant" + from="Assets:Checking" + ;; + +esac + +echo +echo $date $payee +echo " $to $amount kr" +echo " $from"