shell脚本 生成.ok文件及相关操作_创建该目录下所有.txt文件对应的.ok文件。 .ok文件内容: 文件名 文件记录条数 文-CSDN博客

网站介绍:文章浏览阅读1.7k次。(1)遍历所有的zip文件,将有效的zip生成对应的.ok文件#!/bin/bashfunction echo_name(){ for file in `ls *.zip` do unzip -t $file if [ $? == 0 ]; then if [ ! -f $file.ok ]; then create_ok_file $file fi fi done } function create__创建该目录下所有.txt文件对应的.ok文件。 .ok文件内容: 文件名 文件记录条数 文