I'm doing a shell command (such as sh run.sh > log.txt
). How do you overwrite the file each time (so each time I run it log.txt
doesn't get appended)
I'm doing this in a python script and I'm checking the log file each time for a specific number (and I don't want the numbers to get added onto the log.txt
, just replaced)