Re: who call raku?

2024-02-10 Thread ToddAndMargo via perl6-users

On 2/10/24 16:01, ToddAndMargo via perl6-users wrote:

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.




Winsdows no so cool.  perl -e does not get past the
quoting issue from the command console.

So:

>raku

[0] > say "/proc/{"/proc/$*PID/stat".IO.words[3]}/comm".IO.lines[0]
Failed to open file K:\proc\6640\stat: No such file or directory
  in method throw at 'SETTING::'src/core.c/Exception.rakumod line 65
  in method fail at 'SETTING::'src/core.c/Exception.rakumod line 89
  in block  at 'SETTING::'src/core.c/IO/Handle.rakumod line 158
  in method open at 'SETTING::'src/core.c/IO/Handle.rakumod line 155
  in method open at 'SETTING::'src/core.c/IO/Path.rakumod line 212
  in method words at 'SETTING::'src/core.c/IO/Path.rakumod line 805
  in block  at  line 1



Re: who call raku?

2024-02-10 Thread ToddAndMargo via perl6-users

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.


Re: who call raku?

2024-02-10 Thread Marc Chantreux
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

-- 
Marc Chantreux
Pôle CESAR (Calcul et services avancés à la recherche)
Université de Strasbourg
14 rue René Descartes,
BP 80010, 67084 STRASBOURG CEDEX
03.68.85.60.79



Re: who call raku?

2024-02-08 Thread ToddAndMargo via perl6-users

On 2/8/24 14:25, ToddAndMargo via perl6-users wrote:

On 2/8/24 13:19, Bruce Gray wrote:



On Feb 8, 2024, at 15:12, ToddAndMargo via perl6-users 
 wrote:


Hi All,

Is there one of those fancy system variables that will
tell me who called/started raku?


Ooops.  I should have said "what called" not "who called".


raku -e 'say $*USER'
bruce




Actually, I am looking for the name of the calling program:
Cobian, Task manager, deamon, etc..


--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~



Re: who call raku?

2024-02-08 Thread ToddAndMargo via perl6-users

On 2/8/24 13:19, Bruce Gray wrote:




On Feb 8, 2024, at 15:12, ToddAndMargo via perl6-users  
wrote:

Hi All,

Is there one of those fancy system variables that will
tell me who called/started raku?


raku -e 'say $*USER'
bruce




Actually, I am looking for the name of the calling program:
Cobian, Task manager, deamon, etc..


Re: who call raku?

2024-02-08 Thread Bruce Gray



> On Feb 8, 2024, at 15:12, ToddAndMargo via perl6-users  
> wrote:
> 
> Hi All,
> 
> Is there one of those fancy system variables that will
> tell me who called/started raku?

raku -e 'say $*USER'
bruce

-- 
Hope this helps,
Bruce Gray (Util of Perlmonks)