I have a menu with an option to watch the contents of a folder every 15 seconds. I know I can watch this folder by using
watch -n 15 ls -l, but I need to have this
watch process open up in a fresh terminal so that the user can continue using the main script while the watch is running. (Ideally I'd like to be able to kill the watch script from the main script.)
I am just wondering if this sort of thing is possible, I've had a look at gnome-terminal, but I'm not sure this is what I'm looking for. Is there a way to launch a terminal and execute a command in bash?
Thanks in advance.