0
  1. Just for the sake of the question, say I open a terminal an log into my Linux computer. I run a program that keeps outputting information on my screen, looping. I close the terminal window, and the program shuts down.

  2. I set up a cronjob or a startup script that launches the same program as in example 1. The program is looping now, run as root.

  3. I open a terminal, and log into my computer through SSH. Can I make a Bash script that retrieves the output of said program, even if it's running somewhere in the background? I mean, is the program "virtually" outputting information (as in example 1)?

1 Answer 1

0

The program closes stdout and stderr when it exits. Looping it as you describe will just cause it to start and exit continuously. You could look at redirecting stdout and stderr.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.