You have many options.
(您有很多选择。)
The first method would be making the variable as the environment variable and pass to the script before the second script get executed.
(第一种方法是将变量设为环境变量,并在执行第二个脚本之前将其传递给脚本。)
The second method would be making the second script to run in the same shell.
(第二种方法是使第二个脚本在同一shell中运行。)
The methods are described well here with the examples.
(此处通过示例详细介绍了这些方法。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…