Turns out you can, by using () instead of {} in the function declaration you can run the function in a subshell where changes to variables are scoped to the subshell and functions are local.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
replies: