Article 5SP3Y How to export a var from one terminal tab to a other terminal tab ?

How to export a var from one terminal tab to a other terminal tab ?

by
Lennard37
from LinuxQuestions.org on (#5SP3Y)
The follow sample code are doing the follow:
* echo the pid of 1st terminal tab on 1st terminal tab
* echo the pid of 2nd terminal tab on 2nd terminal tab

Copy the follow to the terminal:
Code:echo pid $$; gnome-terminal --title="TAB-Titel" --tab --active -- bash -c 'echo $$ & echo Hello; read exec bash'How to output the pid from 2nd terminal tab on 1st terminal tab ?

I tryed the follow on 2nd terminal tab:
Code:export pid_of_2nd_term_tab=$$I tryed the follow after than on 1st terminal tab a don't get a output:
Code:echo $pid_of_2nd_term_tabIts looks like its not the right way to export a var from one tab to a other.

Any idea to get the pid of 2nd terminal tab available on 1st terminal tab?latest?d=yIl2AUoC8zA latest?i=OKJPPltahRM:-fW4qvNLyaQ:F7zBnMy latest?i=OKJPPltahRM:-fW4qvNLyaQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=OKJPPltahRM:-fW4qvNLyaQ:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments