linux-tutorial/codes/shell/示例脚本/逻辑控制/if-then语句.sh
2019-10-10 08:56:31 +08:00

14 lines
168 B
Bash

#!/bin/bash
#testing the if statement
if date
then
echo "it worked"
fi
echo -e '\n'
if asd
then
echo "it not worked"
fi
echo 'We are outside the if statement'