mksh does not subject ENV to parameter expansion during startup, which is in disagreement with its man page and POSIX. In contrast dash, bash, and ksh93 follow POSIX in this regard. echo echo hello world >"$HOME/envtest" # Note the single-quotes ENV='$HOME/envtest' dash # echos hello world ENV='$HOME/envtest' mksh # no echo