Skip to content
Create a gist now

Instantly share code, notes, and snippets.

# Save a copy of this file to the backup directory
THEDATE=`date +"%Y%m%d"`
THETIME=`date +"%H%M%S"`
filedata=`cat`
mkdir -p "$TM_BACKUP_DIR/$THEDATE"
echo "$filedata" > "$TM_BACKUP_DIR/$THEDATE/$TM_FILENAME.$THEDATE.$THETIME.backup"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.