Languages

What does mean $$ or $! in Bash?

4 points
Asked by:
Hiba-Tate
548

What is defference beetween $$ and $!?

As I see, both returns some number.

1 answer
6 points
Answered by:
Root-ssh
178180

$$ returns currently run process ID (PID)

 

$! returns last program PID that your shell ran in the background (e.g. command &)

0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join