From af752198a95824266ccb3dd2dd49c3248897122b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 14 Apr 2021 09:40:47 +0200 Subject: last-backups: apply recognSubdirRegex multiple times if necessary --- last-backups.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/last-backups.in b/last-backups.in index 4a4c7e3..61117d0 100755 --- a/last-backups.in +++ b/last-backups.in @@ -59,13 +59,15 @@ do delta=$[$(date +%s) - $(date -d $(echo ${lbu} | sed "s/_//g") +%s)] namen[${#namen[@]}]=$( basename $( - echo "${dest}" \ - | sed ' - s#/\('"${recognSubdirRegex}"'\)$#_\1# - ' \ + printf '%s\n' "${dest}" \ | sed ' s#/rsync$## s#/duplicity$## + ' \ + | sed ' + :a + s#/\('"${recognSubdirRegex}"'\)$#_\1# + ta ' ) ) -- cgit v1.2.3-70-g09d2