#!/bin/bash
if [[ $1 = "ls" ]]; then
  #Simulate: boobank ls -q -f csv -v -s id,balance
  echo "id;balance"
  echo "12345@creditcooperatif;1523.99"
  echo "47896@creditcooperatif;"
else
    if [[ $5 = "12345@creditcooperatif" ]]; then
        #Simulate: boobank -q -f csv history "47896@creditcooperatif" -s rdate,type,raw,label,amount --condition "rdate>%4" -n 99999
        echo "rdate;type;raw;label;amount"
        echo "2013-05-04;0;TOTAL;TOTAL;-50.48"
        echo "2013-05-20;1;SNCF;SNCF;-17"
        echo "2013-05-26;1;CAF;CAF;120.25"  
    else
        #Simulate: boobank -q -f csv history "47896@creditcooperatif" -s rdate,type,raw,label,amount --condition "rdate>%4" -n 99999
        echo "rdate;type;raw;label;amount"
        echo "2013-05-04;0;TOTAL;TOTAL;-10"
        echo "2013-05-20;1;SNCF;SNCF;-20"
    fi
fi
