Advanced shell scripting question

jim.mcginness at att.net jim.mcginness at att.net
Thu Sep 5 16:13:25 EDT 2002


Does the answer have to be tidy and fit all on one line?
Or would something like this be okay?


mkfifo /tmp/fifo1-$$;mkfifo /tmp/fifo2-$$
tee errlog </tmp/fifo2-$$ >/tmp/fifo1-$$ &
tee outnerr </tmp/fifo1-$$ &
nice -5 ./testscript1 2>/tmp/fifo2-$$ 1>/tmp/fifo1-$$
rm /tmp/fifo[12]-$$



This kinda imitates bash's process substitution method
(when FIFOs are available and /dev/fd is not). When I
tried it, it preserved the order of the output, thanks to
the writer process being at a lower priority than the
readers. 



More information about the gnhlug-discuss mailing list