From 2aa47ad1130ccb504bb7af053363b90a7b3f8d9a Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 20 Sep 2020 22:57:03 +0300 Subject: [PATCH] Better finding of the last reciepts zip file. For sending my accountant. --- Documents/Shore/taxes/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documents/Shore/taxes/Makefile b/Documents/Shore/taxes/Makefile index afc3a7c..08130cb 100644 --- a/Documents/Shore/taxes/Makefile +++ b/Documents/Shore/taxes/Makefile @@ -1,5 +1,5 @@ last_month != date +%Y-%m --date 'last month' -last_zip != ls *.zip | sort -r | head -1 +last_zip != find -maxdepth 1 -name '*.zip' \! -name '${last_month}.zip' -printf '%f\n' | sort -r | head -1 new_files != find reciepts/ -type f -newer ${last_zip} ${last_month}.zip: ${new_files} -- GitLab