Created
February 24, 2020 08:57
-
-
Save maesoser/11a2a9109aa3369eb1eab4a6e2eadb3d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| function diario { | |
| DATESTR=$(date +%d%m%Y) | |
| FILENAME="/Users/maesoser/diario/entry_$DATESTR.txt" | |
| if [[ -f "$FILENAME" ]]; then | |
| nano $FILENAME | |
| else | |
| touch $FILENAME | |
| echo -e "------------------------------------------------\n" >> $FILENAME | |
| echo " Entrada $(date '+%A %d-%B, %Y')" >> $FILENAME | |
| echo -e "\n------------------------------------------------\n" >> $FILENAME | |
| nano $FILENAME | |
| echo -e "\n------------------------------------------------" >> $FILENAME | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment