bash stdout redirection in a for loop
问题 Possible duplicate Hello, I'm struggling with output redirection within a bash for loop. I have several similar bash scripts, each scripts being launched on a different input file. The scripts called a tool with a few arguments. The bash scripts are like this : my_tool --input input_file --arg1 arg1_name --arg2 arg2_name > output_dir/result_X.dat X being a string which is unique for each script. I run all of them in a for loop : for script in scripts_dir/*.sh do bash $script done However, the