in reply to Re: How Was My Script Run?
in thread How Was My Script Run?

Slightly more general is to use the ps command. Unfortunately details vary on different varieties of Unix:

68$ cat /tmp/p.pl; perl /tmp/p.pl my $ppid= getppid(); my $job = `ps -o "cmd" -p $ppid`; print $job # ----- CMD /bin/ksh

As Occam said: Entia non sunt multiplicanda praeter necessitatem.