Last active
June 28, 2018 15:54
-
-
Save al-maisan/d48fc5cc2abe50f48b81b1c99d7121ed to your computer and use it in GitHub Desktop.
bash function to edit files with a time stamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vdt() { | |
fname=${1:-gist.txt} | |
bname=`basename $fname` | |
ext=${bname#*.} | |
pfix=${fname%%.*} | |
gvim "${pfix}-`date +'%Y-%m-%d_%H-%M'`.${ext}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment