0

Assume a multitail call like the following:

multitail -s 2 -l "long-running-command" -l "short-running-command"

Now, I would like to have both windows remain open, even after they are finished. However, multitail will just close the "short-running-command"-window once it exits. Which makes it kinda useless for my use case.

I know there are workarounds like outputting to files and tailing those instead, but I wonder if there is a way to keep the windows open in multitail even after the process is finished, without creating new files.

TheSHEEEP
  • 125
  • 5

1 Answers1

1

There are a couple of approaches I can think of.

First, if you don't mind having multitail close when the longer running command finishes, you can pipe the shorter running command to it and display stdin:

short-running-command | multitail -s 2 -l "long-running-command" -j

Second, you can add a long delay after running the commands:

multitail -s 2 -l "long-running-command; sleep 120" -l "short-running-command; sleep 3600"
Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164