I want to get a random unused port so that I can wait_for it. Preferably in the range of dynamic ports but, at this point, I'm not picky. I'm using Linux and this does not have to be compatible with windows or Mac.
While this question is marked as answered, if anyone has a way to do this simpler and with less calls to shell, post it below. I don't care if this question is four years old.