Re: [Hampshire] Shell foo challenge

Top Page

Reply to this message
Author: Adrian Bridgett
Date:  
To: adam.trickett, Hampshire LUG Discussion List
CC: 
Subject: Re: [Hampshire] Shell foo challenge
On Mon, Nov 19, 2007 at 23:08:02 +0000 (+0000), Adam Trickett wrote:
> Hi,
>
> At work I was asked if I could direct all of standard out and all standard
> error to the same file, while sending all of standard error to the console
> and passing standard out through grep before it went to the console. It also
> had to work on Windows using the windows native z shell (other Unix command
> line tools such as sed, grep and tee etc allowed). I got it to work but I'm
> not a shell expert, any suggestions?


Sounds nasty - I hate figuring out how to join the FDs together.

"multitee" might come in handy.

These unfortunately don't help me that much. I know how I _want_ to
tie them together, just not how to do it using shell syntax as opposed
to fifos.
http://www.tldp.org/LDP/abs/html/ioredirintro.html
http://www.tldp.org/LDP/abs/html/io-redirection.html

Adrian
--
Email: adrian@??? -*- GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution -*- www.debian.org