The solution to that bash anti-pattern is to create an if-safe-delete function that you know you can trust, and then to use it at the places you might delete /. Write the if-variable-is-empty comparison once, correctly, and record its existence it in the man pages for eternity, so everyone can side-step failures from this.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds