I'm using ps -eo ppid,pid,cmd to view all process, and how can I format the output to view like below?Only given PID and its ancestor will print (until init).23464   current  |23211   bash  |23210   sshd: xxW  |23193   sshd: WWcccv  | 728    /usr/sbin/sshd D  |  1     initI'm writing a script to view ancestral process using PID. and without using pstree if posibble.
View current user process ancestors and formating the output
linux;shell;process;ps