Bash script using default value for empty parameter


You have a bash script that accepts parameter(s) but you want to give a default value for a missing parameter.


For example you have a script that accepts a parameter with the year and month (ie 201703), but you want to give it a default of two months ago if the parameter is missing.