Q:

dynamic display of a running process?

I am writing a script and according to that when I run it certain info will be displayed on
IPCONFIG.
I want to display the running process of the script on IPCONFIG.
I tried using ps -ef | grep scriptname but it displays the process of the script and not the running process.

A:

You can use the following command to get the process id