I want to list the background processes in the script, and after entering the PID the process ends.
#!/bin/bash
jobs -l
echo "Inter PID process: "
read var_PID
kill $var_PID
I tried this "jobs -l"
and that "sudo jobs -l"
Displays immediately without processes:
"Inter PID process: "