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.
In reply to Re^2: How Was My Script Run?
by TomDLux
in thread How Was My Script Run?
by HalNineThousand
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |