I have a bash script that I want to do something like
read one_thing read another_thing
And then it runs some code to see if
another_thing is available or already taken, and if it is taken, it should warn the user and again run
so we can have a new value, leaving
one_thing undisturbed. Since there's no
goto in bash, I'm wondering how to do that. My best guess so far is that maybe I should wrap
read another_thing inside a function, so that if needed, it will just call itself, but I feel there must be a “cleaner” way to do it. I'm looking for suggestions on efficient ways to do it.