Removing .local from $HOSTNAME on Mac OS X

The $HOSTNAME shell variable on my Mac Book Pro (condor) was “condor.local” but I wanted it to be just “condor”. So I ran:

scutil --set HostName condor

which fixed the problem!