#!/bin/bash # 将特定的命令列表赋给变量 COMMANDS=( "php artisan buildStory" "php artisan buildTitle" "php artisan buildKeyword" "php artisan buildSd" "php artisan getOpensdDetail" "php artisan buildPinyin" ) while true do for command in "${COMMANDS[@]}" do $command # 执行特定命令 done sleep 5 # 休眠5秒 done