How to get pid of just started process

What can be simpler than echo $!? As one line:

myCommand & echo $!

Leave a Comment