On mine, the initial shell (from running X Terminal or via ssh) reports "-sh" as $0 and has TMPDIR set to /var/tmp. Running "sh" to start a new shell reports "sh" as $0 and has no TMPDIR set though.