Rewrote shell scripts to be simpler and easier to use

refs #18456