How do I get PID bash?
Answer
One can easily find the PID of the last executed command in shell script or bash. This page explains how to get the PID of a last executed app/program.
…
The syntax is as follows:
Answer
One can easily find the PID of the last executed command in shell script or bash. This page explains how to get the PID of a last executed app/program.
…
The syntax is as follows:
- Open the terminal application.
- Run your command or app in the background. …
- To get the PID of the last executed command type: echo “$!”