ITeye博客

linux之shell遍历目录下所有文件

小网客 · 2018-05-19 13:02 · Linux · 操作系统 · Markdown

有时候需要写脚本批量处理数据对某目录进行遍历通知执行相关操作

for file in 03/*
do
    if test -f $file
    then
        echo $file
    fi
    if test -d $file
    then
        echo $file
    fi
done

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。