Quantcast
Channel: What is the difference between $$ and $! when using /bin/bash -c - Server Fault
Browsing all 2 articles
Browse latest View live

Answer by glenn jackman for What is the difference between $$ and $! when...

$$ is the PID of the current shell. When you use $$ in the bash -c script body, you get the pid of that spawned shell$ echo $$; bash -c 'echo $$'; echo $$687269876872$! is the PID of the last...

View Article



What is the difference between $$ and $! when using /bin/bash -c

I am trying to understand the "oneliner" in this comment by @sysfault:/bin/sh -c 'echo $$>/tmp/my.pid && exec program args'&I tried the following variations...Different $$ inside and...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images