Sample Header Ad - 728x90

`watch -n 100 'sh script.sh >> /path/to/output/output.txt` doesn't write to output.txt?

1 vote
1 answer
102 views
I'm currently executing the following:
watch -n 100 'sh script.sh >> /path/to/output/output.txt' &
It's been running for 30 minutes (I can verify with ps -ef | grep watch), however there's nothing being written to /path/to/output/output.txt (the file doesn't exist). script.sh executes commands that prints to terminal, so shouldn't the >> be directing everything to output.txt?
Asked by student010101 (111 rep)
Apr 15, 2023, 01:42 PM
Last activity: Apr 15, 2023, 11:16 PM