I have scheduled a Bash script to run on the 1st of the month but I need to create 2 variables in it with the 1st and last date of the previous month, whatever those may be.
Is it possible to do this using just Bash?
I have scheduled a Bash script to run on the 1st of the month but I need to create 2 variables in it with the 1st and last date of the previous month, whatever those may be.
Is it possible to do this using just Bash?
You can try following date commands regardless of the day you are executing them to get first and last day of previous month