↧
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 ArticleWhat 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