首页 > shell脚本的变量保存问题

shell脚本的变量保存问题

比如:test.sh

!/bin/bash

a="11111"

echo $a

执行完脚本之后,我在当前的终端上继续输入echo $a
想要得到的结果是111111,如何才能做到?


在test.sh里export a="11111"

source test.sh
参考

【热门文章】
【热门文章】