double check quotes, remove grep
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
1b591a040c
commit
145c6de2fb
1 changed files with 4 additions and 4 deletions
|
@ -459,7 +459,7 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
||||||
# Check: maximum number of backups is reached?
|
# Check: maximum number of backups is reached?
|
||||||
#
|
#
|
||||||
|
|
||||||
count="$(pcmd ls -1 "${ddir}/${INTERVAL}.*/" | wc -l \
|
count="$(pcmd ls -1 "${ddir}/${INTERVAL}."*"/" | wc -l \
|
||||||
| sed 's/^ *//g')" || _exit_err "Counting backups failed"
|
| sed 's/^ *//g')" || _exit_err "Counting backups failed"
|
||||||
|
|
||||||
_techo "Existing backups: ${count} Total keeping backups: ${c_interval}"
|
_techo "Existing backups: ${count} Total keeping backups: ${c_interval}"
|
||||||
|
@ -469,7 +469,7 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
||||||
remove="$((${count} - ${substract}))"
|
remove="$((${count} - ${substract}))"
|
||||||
_techo "Removing ${remove} backup(s)..."
|
_techo "Removing ${remove} backup(s)..."
|
||||||
|
|
||||||
pcmd ls -${TSORT}p1r "${ddir}" | grep "^${INTERVAL}\..*/\$" | \
|
pcmd ls -${TSORT}1r "${ddir}/${INTERVAL}."*"/" |
|
||||||
head -n "${remove}" > "${TMP}" || \
|
head -n "${remove}" > "${TMP}" || \
|
||||||
_exit_err "Listing old backups failed"
|
_exit_err "Listing old backups failed"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue