When a script is launched from command prompt the shell will spawn a subprocess for that script. I want to show that relationship between terminal level process and its children using ps in a tree style output.How can I do this?What I have tried so farfile: script.sh#!/bin/bashps -f -p$1Then I invoke the script from the command line passing in the process id of the terminal shell:$ ./script.sh $$What I want is something like thistop level (terminal) shell process./script.shprocess for ps command itself USER    PID  [..]ubuntu 123     -bashubuntu 1234    \_ bash ./script.shubuntu 12345      \_ ps auxf what Im getting is:  PID TTY      STAT   TIME COMMAND14492 pts/24   Ss     0:00 -bash
How can I show a terminal shell's process tree including children?
shell;ps