Bash Script - iterating over output of find

后端 未结 3 651
既然无缘
既然无缘 2020-12-02 01:08

I have a bash script in which I need to iterate over each line of the ouput of the find command, but it appears that I am iterating over each Word (space delimited) from the

3条回答
  •  日久生厌
    2020-12-02 02:04

    Since you aren't using any of the more advanced features of find, you can use a simple pattern to iterate over the subdirectories:

    for i in ./*/; do
        echo "$i"
    done
    

提交回复
热议问题