ProcessID in *nix

Jay R. Ashworth jra at baylink.com
Wed Jun 23 11:21:42 PDT 2004


On Wed, Jun 23, 2004 at 02:13:40PM -0400, Bob Stockler wrote:
> On Wed, Jun 23, 2004 at 12:38:55PM -0400, Mark Luljak wrote:
> | At Wed, Jun 23, 2004 at 12:33:26PM -0400 or thereabouts, 
> | suspect Bob Stockler was observed uttering:
> | > 
> | > /usr/local/bin/getppid:
> | > 
> | >   #!/bin/ksh
> | >   print $PPID
> | 
> | Also available in bash (1.x and 2.x).  However, it's -not- available in
> | straight Bourne, at least on Solaris.
> 
> Not in any version of the Bourne shell that I know of.
> 
> And (if chmod isn't a problem on the system) the script
> can be written by the processing table, and needn't be
> in existance beforehand.
> 
> I have several tables using USER, where the exact script
> to be executed by it is dependent on variables in the
> table, so I write it from the table, then remove it when
> USER is through with it.

An old, *old* technique.  I used to do this on... I think it was a
NorthStar system; it's been so long (1982 or so) that I don't remember:

We had a top level batch file that was something like
"run a basic program that asks a bunch of complicated questions, and
writes the child batch file as a text file" followed by
"run the child batch file"

It's obvious after you think about it, but not always before.

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

                2004 Stanley Cup Champion Tampa Bay Lightning


More information about the Filepro-list mailing list