chris5126 26 Posting Pro in Training

HI guys,

I have the following code which redirects all standard input and error to the screen and to a log file, I would like to change it so it only redirects standard out and all standard error goes just to the log file can anyone help:

#capture all output to a log file
if [ -p $PIPE1 ]
then
  rm $PIPE1
fi
mkfifo $PIPE1
#cat >logfile1 <PIPE1 &
cat <$PIPE1 &

if [ -p $PIPE2 ]
then
  rm $PIPE2
fi
mkfifo $PIPE2
cat >$LOGFILE <$PIPE2 &
#cat <PIPE2 &

if [ -p $PIPE0 ]
then
  rm $PIPE0
fi
mkfifo $PIPE0
tee $PIPE1 >$PIPE2 <$PIPE0 &

exec 1>$PIPE0 2>&1