From 5111a2bc140e6d6d138ea6fccb60a2a6d31ce5a7 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Mon, 20 Jul 2020 00:08:10 +0200 Subject: [PATCH] Use raw output for yq --- borg_check_last.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/borg_check_last.sh b/borg_check_last.sh index 99bcc88..6f35573 100755 --- a/borg_check_last.sh +++ b/borg_check_last.sh @@ -17,7 +17,7 @@ max_days=7 last_bak=$(borgmatic list --last 1 --format "{end} {NEWLINE}" --successful --json | \ jq '.[].archives | sort_by(.end)[].end | gsub("\\.000000$"; "Z") | fromdate') -repository_name=$(yq '.location.repositories[0]' /etc/borgmatic/config.yaml) +repository_name=$(yq -r '.location.repositories[0]' /etc/borgmatic/config.yaml) current=$(date +%s) difference="$(( current - last_bak ))"