Quantcast
Channel: What is the difference between $$ and $! when using /bin/bash -c - Server Fault
Browsing latest articles
Browse All 2 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 latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>