#!/bin/bash for file in *.zip dofolder=$(echo $file | cut -c 1-10)mkdir $folderunzip -q $file -d $folder doneecho "All zip files have been extracted." # 说明: # 1. for循环遍历当前目录下的所有zip文件 # 2. 使用cut命令提取zip文件名前10个字符,作为新建文件夹的名称 # 3. 使用mkdir命令新建文件夹 # 4. 使用unzip命令解压zip文件到新建的文件夹中 # 5. -q参数表示静默模式,不输出解压过程信息 # 6. 最后输出提示信息