I am running a grep command on each file in a directory. I want the outputs to be appended into the same file. Is this possible?
Here is what I am using unsuccessfully:
for f in /directory/*.txt
do
grep -Eo "[0-9]+\.[0-9]+" $f >> one_output_file.txt
done
I am grepping out a number from each file and I want the numbers to be listed together in ONE output file. Possible?
Thanks!