From 7e523091c6cdd980030b34f1fa0048b2a0c8a4f8 Mon Sep 17 00:00:00 2001 From: motius Date: Wed, 9 Aug 2017 15:36:07 +0200 Subject: [PATCH] bugfix bf() --- shell/bashrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/bashrc b/shell/bashrc index e2e0b0b..8eccb6d 100644 --- a/shell/bashrc +++ b/shell/bashrc @@ -204,10 +204,10 @@ DATE=$(/bin/date +%Y-%m-%d_%H:%M:%S.%N) local TMPFILE=tmp.${DATE}.sw mv "$1" $TMPFILE && mv "$2" "$1" && mv $TMPFILE $2 } -bf() +bf () { -DATE=$(/bin/date +%Y-%m-%d_%H:%M:%S.%N) -local TMPFILE=tmp.${DATE}.bak +DATE=$(/bin/date +%Y-%m-%d_%H:%M:%S.%N); +local TMPFILE=${1}.${DATE}.bak; /bin/cp "$1" $TMPFILE } fi