SUMMARY: Need to capture PID in a script

From: Jim Southerd <jsoutherd_at_bakersfield.com>
Date: Tue Apr 23 2002 - 13:30:24 EDT
Thank you all for your immediate reply, I knew it was a simple question, so
dumb of me!

Answer is echo $$

and in my case it's echo $$ > myfile.pid

Thank you again!

-----Original Message-----
From: Jim Southerd
Sent: Tuesday, April 23, 2002 10:00 AM
To: Sunmanagers (E-mail)
Subject: Need to capture PID in a script


Sorry to ask such a simple question, but for the life of me, I cannot come up
with the answer.

I'm trying add a routine to a script to write out to a file it's PID.

I need to have a record of the PID of the script while it was running.

You see this script is ran by cron, and it runs so quick, I cannot catch it
and it's causing some conflict with another manually run script, when they
'bump' into each other.

Sun, Solaris 7

Thanks in advance for any pointers!

Jim Southerd    jsoutherd@bakersfield.com
Progress / Solaris Administrator
Information Services Sr. Systems Analyst
The Bakersfield Californian  http://www.bakersfield.com
661.395.7429 / Fax: 661.395.7696
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Apr 23 13:38:59 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:41 EST