Bash: how to traverse directory structure and execute commands?

前端 未结 6 1590
半阙折子戏
半阙折子戏 2021-01-12 06:40

I have split a large text file into a number of sets of smaller ones for performance testing that i\'m doing. There are a number of directories like this:

/h         


        
6条回答
  •  不思量自难忘°
    2021-01-12 07:15

    From the information provided, it sounds like this would be a completely straightforward translation of your C# idea.

    for i in /home/brianly/output-*; do
        for j in "$i/"*.[0-9][0-9]; do
            ./myexecutable -i "$j" -o "$j.processed"
        done
    done
    

提交回复
热议问题