I'm trying to run a process that outputs to screen and file using tee. I allo want to capture the pid of the first process (not tee) into a file.
I'm using the following command line - the pid I want is that of xterm.
xterm -title "Test Terminal" -e 'bin/process | tee logfile' & echo $$
/tmp/process.pid
But I'm getting the pid of tee. How can I change the command line to get the pid of xterm?
Many thanks
Stuart