Bash: Address (kill) terminal based on its title?

Viewed 242

I have several terminals getting opened from a "base" one using gnome-terminal with specific titles using PROMPT_COMMAND='echo -ne "\033]0;SOME TITLE HERE\007"' and executing stuff.

Is it possible to address these terminals later on based on their title (for example executing commands in particular ones) or storing their "ID" from the "mother" terminal or at least for killing certain ones of them when dont need them any more?

Regarding the killing I can at least assume that their number in top would be ascending by the order in which they were opened but this is not really bullet-proof as there may be another terminal opened on the way or even in between.

Cheers!

1 Answers
Related