[BASH] Holding a variable unto other scripts.

Ex: Script 1 has pID=333. I want to take pID to Script 2 so I can retrive 333.

How can I do this?

question not clear pls elaborate

There are several ways to do it including passing the PID as an environmental variable or as a command line argument.

Well the problem is, I have a script that changes the NI number of the next opened process ( I.E xclock) which another script does.

Basically:

Menu > Script 3>:
NI number to: inputNI
>Menu>Script2>:
Press 1 to open an xclock>

NI set to $inputNI

I've covered everything except that. I have an export inputNI in the menu but I can't seem to pass from Script3 to Menu with my $inputNI