搜索文件夹下包含的文件

#!/bin/bash

cat ./id.txt | while read line

do

    res=`grep $line ../* -R -s`

    if [ -z "$res" ] ##&& [ "$res" != " " ];

    then

        echo $line "无"

    else

        echo $line "有"

    fi

done
发布了150 篇原创文章 · 获赞 79 · 访问量 63万+

猜你喜欢

转载自blog.csdn.net/liu0808/article/details/96992286