if-then语句

5年以前  |  阅读数:476 次  |  编程语言:Shell 
#!/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'

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8