stack_arr=(${1//,/ })
the space between / and } is very important. Without it, the splitting does not occur. Instead it replaces the “:” with an empty space
stack_arr=(${1//,/ })
the space between / and } is very important. Without it, the splitting does not occur. Instead it replaces the “:” with an empty space