if ... elif ... else ...

if condition_A:

   do thing_A

elif condition_B:

   do thing_B

else:

   do thing_C

while

while condition_A:

   do thing_A

for

for index in list:

   do thing_A

continue 和 break

continue 跳出当前本次循环;

break 跳出当前整个循环。

cat << EOF > /usr/lib/systemd/system/nginx.service
[Unit]
Description=nginx
After=network.target

[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop
PrivateTmp=true

[Install]
WantedBy=multi-user.target
EOF