I usually have multiple Bash tabs open in Terminal, and I needed a quick way to see what each tab contained. The following bash script will set the Title of the tab.
#!/bin/bash
# Sets the title of the Terminal Window / Tab.
# title foo => Sets the title of the Terminal Window / Tab to foo.
echo -n -e "\033]0;$1\007"