一、 for循环看路径
#!/bin/bash for file in /proc/*; do echo $file is file path \! ; done
for循环发起curl
for i in $(seq 14 31)
do
curl "http://orderver.jd.com/deleteOrderver?orderids=277193940935&ver=$i" \
-H 'Cookie: ssa.appid=ssa.appid; token=tokenxxxxx; ' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36'
done
二、Tomcat改最大值脚本
<Connector port="8001" maxPostSize="-1" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" maxParameterCount="1000" maxSpareThreads="750" maxThreads="1000" minSpareTHreads="50" acceptCount="1000" useBodyEncodingForURI="true"/>
#!/bin/bash
file='/home/export/Domains/ordertool.md.com/server1/conf/server.xml'
if cat $file| grep "maxPostSize">/dev/null
then
echo "已存在maxPostSize"
else
port1=`grep -r "redirectPort" $file|awk 'BEGIN {FS="\" "} {print $1}'|awk -F"\"" '{print $2}'`
maxPostSize=$port1"\" maxPostSize=\"-1"
sed -i "s/$port1/$maxPostSize/" $file
fi
-
sed -i 's/原字符串/新字符串/' /home/1.txt
-
sed -i 's/原字符串/新字符串/g' /home/1.txt