On 2/10/24 15:26, Marc Chantreux wrote:
On Thu, Feb 08, 2024 at 02:25:00PM -0800, ToddAndMargo via perl6-users wrote:
Actually, I am looking for the name of the calling program:
Cobian, Task manager, deamon, etc..

linux centric anwser:

raku -e 'say "/proc/{"/proc/$*PID/stat".IO.words[3]}/comm".IO.lines[0]'

hth



$ raku -e 'say "/proc/{"/proc/$*PID/stat".IO.words[3]}/comm".IO.lines[0]'
bash


Very cool.  Thank you.

I also need (only a little bit, I figured a way
around it) to kow how to do it in Windows.

Reply via email to