Linux RedHat 4-5 屏幕上应该没有文本输出,而是特定的数字,即您输入1-脚本为变量分配值,例如a = 10 输入2-脚本显示此变量的值和.d。
#!/bin/bash
while true
do
echo "1 - set some environmental variable
2 - output this environmental variable
3 - erase this environmental variable
4 - exit without errors"
read vop;
case $vop in
1)echo "Write anywere"
read var1;
;;
2) echo $var1
;;
3) unset var1
;;
*) break
exit 0
;;
esac
done