when i launch my bash
script:
$ ./mybashscript.sh
How do I define variables with in it if i want to be able to append values for them in the execution of the above command? ie, how do i declare variables day,month and year in my .sh file if i were using it to record an entry,
$ ./EventDateLog.sh -day=17 -month=2 year=2019
If you are ok with short name variables the easiest way I see would be using
getopts
like this:Example