I took it as meaning sleep for a number of seconds equal to half the value you're sorting. So like f "(( $1 / 2 ))" & or however math works in bash, I always forget.
Well, maybe not with regex, but I'd be lying if I said I never get satisfaction things like that lol. Bash and regex both are very useful tools, great at what they do, but have some design choices that make them annoying. That's sort of what I was trying to get at by saying "yes but also skill issue" lol. A good example is iterating over output in bash. I have zero confidence it's going to do anything remotely close to what I want and have to look up stuff every time I'm trying to do it. "Is it going to go word by word? Line by line? Are there null byte separators?" PowerShell seems appealing in that regard because it works with objects instead of text, but I haven't really used it in depth and I don't see myself going through it just to see if it's worth trying to use more often.
the idea isn't wrong tho, as sleep can do fractions. bash cannot though. therefore it would bloat the code a bit to use bc to multiply the parameter by 0.5 or so.
For anyone who controls time travel this is the fastest algorithm ever. Probably gonna change everything when we are traveling through space and passing by some dark holes.
The output isn't guaranteed to be correct though. Most implementations of sleep can only guarantee that it will sleep for at least the amount of time specified. It can sleep for longer though.