Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想制作一个 bash 脚本,该脚本将从 mysql 表中获取一堆 url,并将所有 url 一个一个地传递给 wget --spider ,并使用 wget 的响应代码更新 mysql:“HTTP 请求已发送,等待响应...... 200 OK”我真的不知道从哪里开始......谢谢
#!/bin/bash DBNAME=DB_NAME USER=USER PASS=PASS HOST=localhost STATEMENT="select name from environment;" COUNTER=$(mysql $DBNAME -h $HOST -u$USER -p$PASS -e "$STATEMENT") for entry in $COUNTER; do echo wget $entry done
这是输出
./mql.sh wget name wget Prod wget uat