六十二. shell预定义变量
[root@localhost opt]# chmod 744 preVar.sh
[root@localhost opt]# ./preVar.sh
Current PID=5581
last PID=5582
Execute=0
[root@localhost opt]# ./myShell.sh
number of parameters=0
六十三. shell运算符
六十四. shell判断语句
#!/bin/bash
if [ "ok" = "ok" ]
then
echo "equal"
fi
echo ""
if [ 23 -gt 22 ]
then
echo "greater"
fi
#test whether a file exits
if [ -e /opt/aaa.txt ]
then
echo "This file exits"
fi