Bash Internal variables $!


Example

The Process ID (pid) of the last job run in the background:

~> $ ls &
testfile1 testfile2
[1]+  Done                    ls
~> $ echo $!
21715