-1

I need to put interactive command (some values are entered from the console and then an infinite loop is running) in the background process. Since I need to enter values, I can't initially run the command in the background. So I want to run the command, enter values and when the loop starts, put it in the background. I can stop the command using Ctrl+Z. But when I run bg, command continues not in the background(the results of the command are displayed on the screen). And after that Ctrl+Z doesn't work.

https://drive.google.com/file/d/1LbwMkEB4_ZTsDoufIdbOwXVbhrKijfe3/view?usp=sharing

Tetiana
  • 117

1 Answers1

3

The way you describe is how you put a process that has been started and "blocks" in the background. That is how it works. Ctrl+z suspends the process and releases the command prompt. bg continues the process in the background.

vanadium
  • 88,010