I am using a simple for loop to process certain input files and get the output in one file. What I am using is
for k in ../some_directory/*.txt; do command (containing -i $k -o outputfile.txt); done
Now each loop gives an output. I want the output to be written in one file. This loop just replaces all the previous files and gives me a number of outputfile.txt files each with the output from every loop. How can I append the command to one file? I don't want the screen output but the output from each of the command.