grazinggoat
Programmer
Hello
I did a search of the forum but couldn't find my answer.
I'm tracking parent and child processes that I want my child pids to be listed horizontally
instead of vertically. I attempted to insert a tab but this is not working.
MYPID="$$"
echo "PPID: ${MYPID}"
CHILDPIDS=$(ps -ef -o user,pid,ppid |grep ${MYPID}| awk '{print "\t"$2}'
echo "Child PIDS: $CHILDPIDS"
so that my output comes out like so:
PPID: 0001
Child PIDS: 1001 1002 1003
Thanks for any insight
I did a search of the forum but couldn't find my answer.
I'm tracking parent and child processes that I want my child pids to be listed horizontally
instead of vertically. I attempted to insert a tab but this is not working.
MYPID="$$"
echo "PPID: ${MYPID}"
CHILDPIDS=$(ps -ef -o user,pid,ppid |grep ${MYPID}| awk '{print "\t"$2}'
echo "Child PIDS: $CHILDPIDS"
so that my output comes out like so:
PPID: 0001
Child PIDS: 1001 1002 1003
Thanks for any insight