Bash multiple files processing

前端 未结 5 1826
感动是毒
感动是毒 2021-01-23 19:21

I have a file named data_file with data: london paris newyork italy...50 more items

Have a directory with over 75 files, say dfile1, dfie2...afle75 in which i am perform

5条回答
  •  不知归路
    2021-01-23 20:16

    The find command will slow things down and the script is more complicated than it needs to be.

    If you want to do this with grep, better to loop through data_file and within that grep $line * > /dev/null && do_something (or grep -R $line * > /dev/null && do_something if there are subdirectories to deal with)

提交回复
热议问题