Posted on :: Tags: , , , , ,

Don’t use ~ in scripts; use $HOME

I have used ~ several times in scripts, but it may not always expand as expected depending on the environment. Use $HOME to refer to the home directory; it is much more reliable and always works.