Hi All,
Can anybody tell me . What does it mean by following statement
export $$
Generally export command sets up the environment variable and if any
child process is created it passes on to it
Thanks & Regards
Srivatsav
Hi All,
Can anybody tell me . What does it mean by following statement
export $$
Generally export command sets up the environment variable and if any
child process is created it passes on to it
Thanks & Regards
Srivatsav
"echo $$" will display the pid of bash shell, e.g. :
[sysgate@host:~] $ echo $$
24786
[sysgate@host:~] $ ps -ef | grep 24786
1000 24786 17028 0 16:20 pts/2 00:00:00 /bin/bash
What sysgate is telling you - it will not work to export the current pid. Children will have the $$ defined during creation (exec) of the new process, so it will be written over, anyway. Plus that command generates a syntax error in bash.