linux - getting the pid of a process in zsh -


i coding on red hat machine , want process id of process in interactive mode in script.

in bash 'pidof' works not in zsh.

what equivalent of pidof in zsh ?

thank in advance.

you may wish which pidof in bash, determine location of pidof , try running zsh absolute path.

if above works, have $path issue (as have never seen pidof bash builtin.)

if doesn't work try following:

this not simple want, works me:

pgrep -u $user some_program

where 'some_program' name supply pidof.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -