You must start the process in the background, but first you need to enable job management. Otherwise, you cannot kill or bring the process to the forefront if you want.
To enable job management:
set -m
To perform some task in the background, do:
task &
To control the background task, use the syntax jobspec ( %[n] ). For example, to kill the last running process, do:
kill %
Please note that enabling job control is only required if you are really using a script (as indicated in the question). If you are working online, job control is already enabled by default.
The mask for bash has much more information in the MANAGEMENT WORK section.
source share