编辑incld.sh
echo "THIS IS INCLD.SH"
./test.sh
编辑test.sh
read -p "请输入数字1:" a
read -p "请输入数字2:" b
echo $a
echo $b
if test $a -eq $b
then echo "相等"
else echo "不等"
fi
read -p "请输入字符1:" a
read -p "请输入字符2:" b
echo $a
echo $b
if test $a -eq $b
then echo "相等"
else echo "不等"
fi
if test -e ./getStringFile
then echo "getStringFile存在"
else echo "getStringFile不存在"
fi
执行incld.sh
/incld.sh
THIS IS INCLD.SH
请输入数字1:1
请输入数字2:1
1
1
相等
请输入字符1:2
请输入字符2:3
2
3
不等
getStringFile存在