From 8a70e30d971a3564e722bd3b4dcbb65fc4836e5d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 30 Oct 2009 19:26:32 +0100 Subject: [PATCH] cleanup delete_from_file(): clean suffix stuff Signed-off-by: Nico Schottelius --- ccollect.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 08cf756..b90c2c6 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -108,10 +108,9 @@ pcmd() delete_from_file() { file="$1"; shift - suffix="$1" # only set for delete_incomplete -# [ "$#" = 1 ] && suffix="$1" && shift + suffix="$1" # only set, if deleting incomplete backups while read to_remove; do - set -- "$@" "${ddir}/${to_remove}" + set -- "$@" "${to_remove}" [ "$suffix" ] && set -- "$@" "$(echo ${to_remove} | sed "s/$suffix\$//")" done < "${file}" _techo "Removing $@ ..."