When you run a Shell/Bash script, the execution of the script is a process. When the script runs other programs, these are also processes. If you run other scripts from your script, depending on how you run them, they may also be their own processes.
For example, if you run ./install.sh
and the content is:
#!/bin/bash
...
...
...
Then you will have a bash
process running your script. Something like:
ps -ef
joe 345 1 /bin/bash install.sh
345 represents the PID (Process ID) and 1 represents the PID of the parent process.
If your install.sh
script then runs, say touch /tmp/myfile
then you would have:
ps -ef
joe 345 1 /bin/bash install.sh
joe 346 345 touch /tmp/myfile
As for the output, the Superuser post linked in the comment of the question explains it fairly well so I won't attempt to re-explain it. But the script/program's output is bound to stdout so that comes out on whatever is stdout. If it is the console, so be it. If it's a file, great. In theory if the process is running in the background, and you disconnect from the console and stdout is the console, that should not be a problem, but you will not have any of the output for later review.