I have the below commands which is running properly on the local machine.
watch -t -n1 "echo `date '+%Y-%m-%d %H:%M:%S'` | tee -a Time.txt" &>/dev/null &
But when I run it from the remote machine I won't create the expected output i.e. Time.txt is not created and will not be running as a background process.
ssh ipaddress watch -t -n1 "echo `date '+%Y-%m-%d %H:%M:%S'` | tee -a Time.txt" &>/dev/null &
Please help me on this. I have tried multiple options like putting ', " for watch command but it did not helped me out.