I came across some strangely inconsistent behavior in BASH parameter expansions across a few different servers, while trying to write a quick function. On some versions of BASH, to use a tilde in a substring replacement, the tilde must be escaped, or it will be re-expanded to the home directory: while on other systems, it will not be re-expanded, and