Just append the filename
Code:
for ((i = 0 ; i <= 130 ; i++)) # here you want <130 or you'll get 131 ie 0-130 inclusive
do
touch Outputs/t$i.out
echo "Tests: $i" >Outputs/t$i.out
echo "Date:" >>Outputs/t$i.out
date
done
Notes:
1. indent your code
2. 'touch' is redundant; the echo will create the file
3. '>' means output to file, overwriting what's there! '>>' means append.
In fact, you could use append on both cmds; it also creates the file if not extant
4. why 'date'; that doesn't do anything ... see note 5
5. I think what you mean for the last 2 lines is
Code:
echo "Date: $(date)" >>Outputs/t$i.out
Do read those links above.