Filename argument quoted to handle filenames with whitespace

This commit is contained in:
Dimitri Kaparis 2021-09-26 16:13:57 +03:00
parent a7e12f000b
commit bdd6db0ff4
1 changed files with 1 additions and 1 deletions

View File

@ -3,6 +3,6 @@
# ec-export.sh <wallet-file> <start-date> <end-date>
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}}'