by prairiedock · 10y ago · 0 comments
> This will set the value of TMP to `/tmp/myproject` only if it has not been set.
This should read "if", not "only if". And it should read: "This will set the value of TMP to `/tmp/myproject` if it has not been set or if it is null."
The form that means 'if it has not been set' has no colon; it is
TMP=${TMP-/tmp/myproject}
See https://www.gnu.org/software/bash/manual/bash.html#Shell-Par...No comments yet.