put the above file into /usr/local/bin/settitle (or somewhere accessible by your PATH) then $ settitle my new title