From 951c47cf14b72f86eb1006d467d9a1ea59fbfe5d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 22 May 2009 19:43:48 +0200 Subject: add time before the filextension --- .zsh/rc/30functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.zsh') diff --git a/.zsh/rc/30functions b/.zsh/rc/30functions index b272d3f..3250bf9 100644 --- a/.zsh/rc/30functions +++ b/.zsh/rc/30functions @@ -22,12 +22,12 @@ update_zshrc() { # add current time to a file mbk() { - mv -b ${1} ${1}_`date +%Y-%m-%d_%T` + mv -b "${1}" "$(echo $1 | sed "s/\./_`date +%Y-%m-%d_%T`./")" } # easily make backups bk() { - cp -b ${1} ${1}_`date +%Y-%m-%d_%T` + cp -b "${1}" "$(echo $1 | sed "s/\./_`date +%Y-%m-%d_%T`./")" } # chpwd () => a function which is executed whenever the directory is changed -- cgit v1.2.3-24-g4f1b