watch -n1 $() does not update $().
what is the workaround?
here is my example:
watch -n1 echo $(( $(date +%s -d "sun") - $( date +%s ) )) this results in
Every 1.0s: echo 106602 106602 the expected output should have been:
Every 1.0s: echo $(( $(date +%s -d "sun") - $( date +%s ) )) 106602 with 106602 being reduced every second
watchis invoked