Skip to content

Instantly share code, notes, and snippets.

@Calmarius
Created January 4, 2022 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Calmarius/ccc9df9c25d125faa2aea89ee91ca93e to your computer and use it in GitHub Desktop.
Save Calmarius/ccc9df9c25d125faa2aea89ee91ca93e to your computer and use it in GitHub Desktop.
#!/bin/bash
YEAR=`date +%Y`
echo "YEAR: $YEAR"
MONTH=`date +%m`
echo "MONTH: $MONTH"
DAY=`date +%d`
echo "DAY: $DAY"
mkdir -p $YEAR/$MONTH
FILE=$YEAR/$MONTH/$DAY.txt
if [ ! -s $FILE ]
then
echo $(LC_TIME=en_US date +%A) > $FILE
fi
micro $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment