I think I've figured out why my profitability switcher was having problems with some coins. I noticed it when I tried switching my rig from Genoil back to Claymore (I'm having trouble getting Genoil to run for more than 24 hours without crashing)...the script would run, and I'd end up with two or more instances of the Claymore miner running.
pgrep and pkill, when called with the -f option (to look at the whole command line), need to have "+" escaped for some reason...most likely the pattern is processed as a regular expression and not a simple string. Any miner command string that included "stratum+tcp" (that's basically all of them except the equihash and Genoil daggerhashimoto miners) thus wasn't searchable or killable.
I've committed a fix that should take care of that. It also prepends the search string with "^" to match on the miner process itself, not the screen process that spawned it. (Killing the miner will automatically kill the parent screen process.)
Please test and ensure with confidence; that it is rock solid: then I will integrate these changes.
It would be helpful if you did so with the integrated oneBash + switch version I made (swap the relevant part of switch with your updated code); so I can be sure it works as intended.