Today in IT hate ... #bash! Can't edit a shell script while it is running, becau...

@DrHyde@fosstodon.org

Today in IT hate ... #bash!

Can't edit a shell script while it is running, because bash doesn't just read the whole thing into memory and execute it, it reads a few bites at a time and then starts executing, reading more as necessary starting at the offset it last read up to. An intermediate write means that bash then ends up with inconsistent gibberish in memory. This might have made sense for original #sh running on Ken and Den's original #PDP7 with 4K-words of RAM but it's stupid these days.