运行 终端中有更多 sh
Run more sh in terminal
如何在一个 sh
文件中 运行 多个文件?
我试过了,但没有成功,好像只是 运行 第一个。有人可以帮我吗?
sh ./robots.sh
sh ./update_robots.sh
sh ./update_auctions_end.sh
sh ./auto_bidders.sh
此致
我的 .sh 文件包含 while..
while [ true ]
do
php /Applications/XAMPP/xamppfiles/htdocs/xxxx/cronjob/auction.end.php
sleep 30
done
创建单个文件all.sh
里面all.sh
./robots.sh
./update_robots.sh
./update_auctions_end.sh
./auto_bidders.sh
最后,我要求删除 all.sh
中的 sh 词
如果您想让他们同时到达 运行 (如您的评论中所述),请使用 &
.
你的情况:
#!/bin/bash
./robots.sh &
./update_robots.sh &
./update_auctions_end.sh &
./auto_bidders.sh &
这将 运行 每个脚本都在后台。
确保您已授予所有脚本执行权限(最简单的方法可能 chmod +x script
)。
如何在一个 sh
文件中 运行 多个文件?
我试过了,但没有成功,好像只是 运行 第一个。有人可以帮我吗?
sh ./robots.sh
sh ./update_robots.sh
sh ./update_auctions_end.sh
sh ./auto_bidders.sh
此致
我的 .sh 文件包含 while..
while [ true ]
do
php /Applications/XAMPP/xamppfiles/htdocs/xxxx/cronjob/auction.end.php
sleep 30
done
创建单个文件all.sh
里面all.sh
./robots.sh
./update_robots.sh
./update_auctions_end.sh
./auto_bidders.sh
最后,我要求删除 all.sh
中的 sh 词如果您想让他们同时到达 运行 (如您的评论中所述),请使用 &
.
你的情况:
#!/bin/bash
./robots.sh &
./update_robots.sh &
./update_auctions_end.sh &
./auto_bidders.sh &
这将 运行 每个脚本都在后台。
确保您已授予所有脚本执行权限(最简单的方法可能 chmod +x script
)。