for 循环
#!/bin/bash svc1=`kubectl get svc -n service-brokers | grep -v NAME | awk '{print $1}'` for svc in $svc1; do `kubectl get svc -n service-brokers $svc -o yaml | grep 'infra.tce.io/endpoints' | grep -q '10.30.14.6:15004'` && echo $svc done
for i in $(seq 1 200);do R=$(redis-cli -h 10.13.1.37 -p 3922 -a MiwF2DTNP84GrjcYWxkyZzK5IJahsfvQpnlVumb3O76ogRBX role|head -1);D=$(date +%H:%M:%S);echo $D $R;sleep 1;done
#!/bin/bash dir=/d/sql_run/ [`whoami` == sql_name ] && for p in $(ls $dir);do if [ ! -d "$dir/$p/mysqlagent" ];then continue fi echo "updaing $p" pushd $dir/$p cp -a /data/home/bin/tdsql_addto_cgroup ./mysqlagent/ pushd mysqlagent/bin ./start.sh popd popd done