Search for strings
in the files of multiple pod containers for i in $(kubectl get pods -n xxx-dev -o custom-columns=name:.metadata.name|grep aaa-http);do
echo "pod=== ==============="$i;
echo "path:/dir/templateweb."${2}".log";
echo "csid========== ======"$1;
kubectl exec -it $i -n xxx-dev - grep $1 /dir/templateweb.${2}.log;
done;
Start virtualbox virtual machine without interface in windows environment
:
cd D:\Program Files\Oracle\VirtualBox
VBoxManage startvm centos7-mini-s110 -type headless
VBoxManage startvm centos7-mini-s111 -type headless
VBoxManage startvm centos7-mini-s112 -type headless
VBoxManage startvm centos7-mini-s113 -type headless
VBoxManage startvm centos7-mini-s114 -type headless
Pause
Close the interfaceless virtualbox virtual machine
d in the windows environment :
cd D:\Program Files\Oracle\VirtualBox
VBoxManage controlvm centos7-mini-s110 poweroff
VBoxManage controlvm centos7-mini-s111 poweroff
VBoxManage controlvm centos7-mini-s112 poweroff
VBoxManage controlvm centos7-mini -s113 poweroff
VBoxManage controlvm centos7-mini-s114 poweroff
Pause
ftp文件下载
#!/bin/bash
ftp -n <<EOF
open $1 $2
user $3 $4
binary
prompt
get $5 $6
close
bye
EOF
sftp file download
lftp -u $3,$4 sftp://$1:$2<<EOF
cd $5
lcd $6
get $7 -o $8
by
EOF
echo $?