Which OS version are you using?
I have 10.8 Mtn Lion on the machine I'm using right now, so the following applies to it. What you see may differ depending on OS version.
In the 10.8 Terminal, start by looking in:
Menu: Terminal > Preferences... > Settings pane > Window sub-pane
Make sure the "Profiles" list on the left shows your current active profile (window display parameters).
In the Window sub-pane is a heading named "Title" (other headings in this sub-pane: Background, Window Size, Scrollback). "Title" has a text field to enter an arbitrary window title, and a set of checkboxes. One of the checkboxes is "Active process name". Uncheck that.
Close the window and confirm that this change in settings does what you want, by running a shell script that exhibited the unwanted behavior.
Does this solve the problem?
All the settings in the Preferences window are accessible to the 'defaults' command. This means you can control the state of the "Active process name" checkbox using a 'defaults' command-line.
Is this what you want to do? Or does simply turning off the "Active process name" checkbox accomplish your goal?
To get a listing of the current Terminal settings, paste this command into Terminal:
Code:
cd ~ ; defaults read com.apple.Terminal >what.txt
Open the file 'what.txt' in TextEdit.app (or a text editor of your choice). Scroll thru and find your active profile, as identified in the "Window Settings" array. Within that profile, find the "ShowActiveProcessInTitle" item, which will be 0 for an unchecked checkbox, or absent or 1 for a checked checkbox. This shows that the setting is obtainable and controllable by the 'defaults' command.
The 'defaults' command line that changes a specific setting in one of the Window Settings objects is going to be non-trivial. PListBuddy would probably be a better tool, but it's not tied into the defaults/Preferences sub-system.
You could read the 'defaults' man page and puzzle out the necessary command line, or ask here, after telling us what your chosen window profile name is.