If you need an optional parameter for a bash function or script heres how to add them.
myprint(){
CURRENT_APPNAME=${1-appname};
NEW_APPNAME=${2-new_${CURRENT_APPNAME}};
echo $CURRENT_APPNAME; # appname
echo $NEW_APPNAME; #new_appname
}
Related External Links: