Normally when a parameter is passed to a shell script, the value goes into ${1} for the first parameter, ${2} for the second, etc.
How can I set the default values for these parameters, so that if no parameter is passed to the script, we can use a default value for ${1}?
You can’t, but you can assign to a local variable like this:
${parameter:-word}or use the same construct in the place you need $1. this menas use word if _paramater is null or unsetNote, this works in bash, check your shell for the syntax of default values