常用shell命令语法__Linux
echo "Hello, world!"
# 这是一行注释
# 条件语句
if [ condition ]; then
# commands
elif [ condition ]; then
# commands
else
# commands
fi
# for循环
for i in {1..5}; do
# commands
done
# while循环
while [ condition ]; do
# commands
done
# 函数
function_name() {
# commands
}
# 退出shell脚本
exit 0