#!/bin/bash # 批量解压缩脚本 # 作者: shaohsiung # 时间: // # Store all file names in the tmp directory with the suffix .tar.gz file in the temporary file ls.log cd /tmp ls *.tar.gz > ls.log for i in $(cat ls.log) do # Throw the output information at the time of
for循环语法一 for 变量 in 值1 值2 值3 - do 程序 done 例子 需求:批量解压缩 脚本: #!/bin/bash cd /root/publicls *.tar.gz > public.logls *.tar.bz >> public.log for i in $(cat public.log) do tar -zxf $i &> /dev/null donerm -rf public.log
之前用过openpyxl库保存数据到Excel文件写入不了,换用xlsxwriter 批量插入图片到Excel表中 1 import os 2 import requests 3 import re 4 from openpyxl import load_workbook 5 import xlsxwriter 6 from multiprocessing.dummy import Pool as ThreadPool 7 from openpyxl.drawing.image import I