Maybe my shell is weird, but I had to say: FOO=${FOO:-default} The simple ": ${FOO:-default}" didn't work. I find those ":" comments useful for makefiles where I want to null out a particular operation e.g. INSTALL=":" make fred where $INSTALL normally defaults to "install".