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 -- --------------------------------------- Stuart Bailey BSc (hons) CEng CITP MBCS LinuSoft (Owner) Linux Specialist (0845) 6583563 http://www.linusoft.co.uk ---------------------------------------- -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.