Created
December 12, 2018 18:18
-
-
Save kellthenoise/27daf8da09eac224801de69b8d25a0e5 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# log.sh | |
# do the following - /usr/bin/script ~/Desktop/Terminal.log | |
#* Formatted date & time string. | |
FORMATTED_DATE=`/bin/date "+%Y-%m-%d%H%M%S"` | |
#* Archive the previous file | |
/bin/cp -f ~/Desktop/Terminal.log{,.$FORMATTED_DATE.txt} | |
#* Begin a new one | |
/usr/bin/script ~/Desktop/Terminal.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment