Home > front end >  Open another terminal to execute a command with ongoing aoutput in bash script - how continue the ba
Open another terminal to execute a command with ongoing aoutput in bash script - how continue the ba

Time:12-17

I have a bash script which starts two local blockchain nodes instead of saving the output into a log file, i want to open a terminal for printing it continuously on the terminal:

I tried

konsole --noclose -e blockchain start

but then the bash script does not continue to the next command in the script.

Any ideas how to keep the script running while opening 2 terminals with ongoing output?

CodePudding user response:

You can achieve this by putting an & on the end of the command:

konsole --noclose -e blockchain start &

This flags to the shell that it should execute the command in the background in a subshell. The effect is that the shell doesn't wait for the command to finish, and continues immediately.

  • Related