I have a function for quickly making a new SVN branch which looks like sofunction svcp() { svn copy repoaddress/branch/$1.0.x repoaddress/branch/dev/$2 -m dev branch for $2; }Which I use to quickly make a new branch without having to look up and copy paste the addresses and some other stuff. However for the message (-m option), I'd like to have it so that if I provide a third parameter then that is used as the message, otherwise the 'default' message of dev branch for $2 is used. Can someone explain how this is done?
Optional parameters in bash function
bash;function;parameter
function svcp() {     msg=${3:-dev branch for $2}    svn copy repoaddress/branch/$1.0.x repoaddress/branch/dev/$2 -m $msg;}the variable msg is set to $3 if $3 is non-empty, otherwise it is set to the default value of dev branch for $2.  $msg is then used as the argument for -m.