commit | ab44572ba4f3cedfb27c6e26b60ca75bfdc4ecdf | [log] [tgz] |
---|---|---|
author | Florian Baumann <flo@noqqe.de> | 周二 12月 14 14:33:16 2010 +0100 |
committer | Florian Baumann <flo@noqqe.de> | 周二 12月 14 14:33:16 2010 +0100 |
tree | 165631f69f49151df8d7ce635733bd24ce8a249a | |
parent | 2ce12674f643329ee1cec9ba7bc7fd009f06d9ef [diff] |
added minimal config backup function buf()
diff --git a/plugins/base.plugin.bash b/plugins/base.plugin.bash index 9c8cb92..02c0104 100644 --- a/plugins/base.plugin.bash +++ b/plugins/base.plugin.bash
@@ -87,4 +87,10 @@ | grep -v "COMPREPLY=()" | sed -e "s/()//" } - +# back up file with timestamp +# useful for administrators and configs +buf () { + filename=$1 + filetime=$(date +%Y%m%d_%H%M%S) + cp ${filename} ${filename}_${filetime} +}