

If you’ve never heard of ConnMan, yeah, I only know it from Enlightenment, too.
I used it for a while trying to wean myself off NetworkManager, which has a lot of optional dependencies that distributions tend to link in. So, you don’t want Gnome on your system, but you want NM? Too bad, you got Gnome.
Anyway, connman is pretty fussy and not very intuitive. I think it’s better for systems that are always on the same network; it’s a pain to travel and connect to open networks with.
I worked at a place once that had a system that was all bash that would take hours to run. I rewrote it in Ruby and got the run down to about 10 minutes.
This was 2000; I don’t recall anymore how much of that was the runtime and got much was just refactoring and hindsight - god knows how old that jumble of bash scripts were. A lot must have been the interpreter; even just looping is far slower in bash than probably anything else.
Not a comment on your script; just remembering that win.