Add a script for reading bank statements
This commit is contained in:
parent
e094491c00
commit
e0ebe4d9b3
10
scripts/read-bank-statement
Executable file
10
scripts/read-bank-statement
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Ensure there is an argument
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: $(basename $0) <file.csv>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat "$1" | jq -cRr 'split(",") | "\(.[2])\t\(.[6])\t\(.[4])"' | tr -d '"' | tail -n +2 | grep -v "PAYMENT - THANK YOU" | column -ts $'\t'
|
Loading…
x
Reference in New Issue
Block a user