I have a bash script that continuously outputs some information when run. I need to
- Automatically run this when my system boots.
- Monitor this output and control it every once in a while remotely, using ssh.
For this purpose, I would like to use tmux. So how do I approach this? For simplicity, let's say my shell script is this:
#!/bin/bash # just an example for simplicity watch date
I need another script that runs this in tmux and be able to attach to this when I need, later. I am struggling at the part where I need to create a new tmux session with a name and make it run another shell script. Once I have this working, I can put this in another shell script and take care of the rest of the stuff. That is easy, I think. Can someone give me an example for this specific step please?