Thursday, 22 August 2013

How to create a shell script to display all PID started by a program?

How to create a shell script to display all PID started by a program?

How to create a shell script to display all PID of processes started by a
program, each on a new line. The script should accept the path to the
program as a parameter like: ./displaypid.sh {path_to_the_program}
This is what I've wrote in the script:
#!/bin/bash
pidof $1
but i think it isn't enough.

No comments:

Post a Comment