First post + a somewhat useful bash script

This is my first entry in this here fediverse blog, yay! I've been digging into the fediverse lately and will try to move in permanently.

I'm not so big on introductions, but I'm a beginner web developer, I started learning front-end but have been trying to get into back-end a little more, and I also enjoy learning about Linux and bash scripting. Anyway here's a nifty little bash script I made that creates a new file with today's date as the name, with optional file extension and also gives the option to automatically open the file in a specific program, like vim, mousepad, codeOSS, or whatever.

#!/bin/bash

#create a new file with name of today's date. 
#Optional parameters -p: program to automatically open file (must be valid console command); -f: file extension

# Options 
while getopts p:f: option
do
	case "${option}"
		in
		p) PROGRAM=${OPTARG};;
		f) EXT="."${OPTARG};;
	esac
done

#default date format is dd-mm-yyyy
day="$(date +%d)"
month="$(date +%m)"
year="$(date +%Y)"

file=$day"-"$month"-"$year

# If file extension ($EXT) is set create file name with extension, 
# if not, # only the file name. 
if [ ! -n "$EXT" ]
then
	file=$file
else
	file=$file$EXT
fi
# Create the file
touch $file

# If program ($PROGRAM) is set, open file with that program
if [ -n "$PROGRAM" ] 
then comm="$PROGRAM $file"
	eval $comm
fi

Might be useful if you keep track of things daily or keep some kind of blog.

I will post more later, maybe also about cool things I learn about JavaScript, PHP, MySql and other stuff. Cheers!