I have the following scenario.
The user would type the PID of a process, and the script should show the process and it\'s subprocesses, sub-subprocesses (and so on)
Your first step is to pipe ps through awk and grep. By using awk, you can isolate either the 'this process PID' field or the 'parent process PID' field.
Or, have a stroll through the /proc file system.