Automate opening multiple tabs when starting Terminal I am trying to automate opening of multiple tabs, naming each tab (printf "\e]1;${TAB_NAME}\a") and doing a cd and maybe something else in each tab.  Can that be done either in a startup script or, better yet, configured within Terminal itself?
You can try this.

You can use the Terminal Profiles to give each tab its own profile.
This way, you can set the shell command for each tab individually.

And you can save the window group (tabs) so they will open on Terminal launch.

Example of set up

Set up your tabs in a window, i.e., cd to the directories in each tab as desired.

Then, go to the Terminal Preferences and to  Settings Tab menu:


Select the Basic Profile.
Click the + button at the bottom. This will duplicate the profile.
Name the new profile (for example, home).


Repeat steps 1 - 3 as many times as the number of tabs, and name each of them with unique names.

In my example, I will have 'home' and 'work'.

Now, for my 'home' profile, I will:


Select the Shell tab.
Check 'Run command'.
Set the command string to  cd ~
Check 'Run inside shell'.


For each profile, I will repeat steps 5 - 7, changing the cd command accordingly.



In my tab named 'Home Dir', I will:


Ctrl + click on the window to get the contextual menu, and select 'Show inspector'.
Select the 'settings' tab
Set its profile to the 'home' profile.


For each tab, I will repeat steps 1 - 3, changing the profile accordingly.

Now, my Home tab's profile should be the 'home' profile and my tab named 'Work Dir'  profile should be the 'work' profile.



Now using the Windows Menu "Save Windows As Group".

Check the checkbox  - "Use window group when Terminal starts".



I have tested it as best I can and this set up works.

Each tab opens in the cd's to its own directory. And does so on Terminal start up.

I like this so much, I am going to use it myself.