I want to monitor rows of a dynamic file and I use watch command for this. I have 2 files: test-status and iplist_test. I control something in iplist_test and I type this output to test-status. iplist_test file has 150 rows and I want to see a result like 14/150 or 25/150 etc. I use the following command for this:
watch -n .1 echo -e "$(cat test-status | wc -l)\/$(cat iplist_test | wc -l)"
The command does not work like a watch command, it is static. I refresh manually for live results. What's wrong with my command?