diff --git a/ec-export.sh b/ec-export.sh index 9a679ea..75ec19a 100755 --- a/ec-export.sh +++ b/ec-export.sh @@ -3,6 +3,6 @@ # ec-export.sh echo transaction_hash,label,confirmations,value,fee,timestamp,fiat_value_EUR,fiat_balance_EUR,fiat_fee_EUR,input_addresses,output_addresses -electron-cash history -w $1 --show_fiat --use_net | +electron-cash history -w "$1" --show_fiat --use_net | jq -r 'map({txid,"label",confirmations,value,fee,timestamp,fiat_value,fiat_balance,fiat_fee}) | (first | keys_unsorted) as $keys | map([to_entries[] | .value]) as $rows | $keys,$rows[] | @csv' | gawk -vFPAT='[^,]*|"[^"]*"' -v OFS="," '{ $6 = strftime("%Y-%m-%d %H:%M",$6); if($6>="'$2'" && $6<="'$3'") {print}}'