summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-05-22 19:43:48 +0200
committerFlorian Pritz <f-p@gmx.at>2009-05-22 19:43:48 +0200
commit951c47cf14b72f86eb1006d467d9a1ea59fbfe5d (patch)
tree731ee31b099c0dc6745bb3f9805348afd0466bb4
parent7436f82ba4181d5c684003f49f576e3897120b1e (diff)
downloaddotfiles-951c47cf14b72f86eb1006d467d9a1ea59fbfe5d.tar.gz
dotfiles-951c47cf14b72f86eb1006d467d9a1ea59fbfe5d.tar.xz
add time before the filextension
-rw-r--r--.zsh/rc/30functions4
1 files changed, 2 insertions, 2 deletions
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