From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/763 Path: news.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: OT: svlogd-logprocessor with bash/multitee Date: Wed, 13 Apr 2005 12:50:55 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Message-ID: References: <425D258D.9010708@zweipol.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113410900 649 80.91.229.2 (13 Apr 2005 16:48:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2005 16:48:20 +0000 (UTC) Cc: supervision@list.skarnet.org Original-X-From: supervision-return-999-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Apr 13 18:48:18 2005 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1DLl1o-0004oz-T7 for gcsg-supervision@gmane.org; Wed, 13 Apr 2005 18:47:49 +0200 Original-Received: (qmail 769 invoked by uid 76); 13 Apr 2005 16:51:25 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 764 invoked from network); 13 Apr 2005 16:51:25 -0000 Original-To: Henrik Heil In-Reply-To: <425D258D.9010708@zweipol.net> (Henrik Heil's message of "Wed, 13 Apr 2005 15:58:37 +0200") Mail-Copies-To: nobody Mail-Followup-To: Henrik Heil , supervision@list.skarnet.org Original-Lines: 34 User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:763 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:763 Henrik Heil wrote: > /usr/bin/multitee 0:6 0:7 \ > 7>&1 | sed s/test_stdin/test_fd7/ This can be simplified a bit: multitee 0:6 0:1 | sed s/test_stdin/test_pipe/ > #!/bin/sh > exec 6>&1 > /usr/bin/multitee 0:6 0:7 0:8 \ > 7>&1 | sed s/test_stdin/test_fd7/ \ > 8>&1 | sed s/test_stdin/test_fd8/ > > # echo test_stdin | ./logproc.sh > > test_stdin > [...programm does not return] You have the second pipe set up between the two seds, but you want it to be between multitee and the second sed: { { exec 7>&1 && multitee 0:6 0:7 0:1 | sed s/test_stdin/test_pipe1/ >&6 } | sed s/test_stdin/test_pipe2/ } 6>&1 bash has an extension that makes this easier: multitee 0:1 \ 0:6 6> >(sed s/test_stdin/test_pipe1/) \ 0:7 7> >(sed s/test_stdin/test_pipe2/) paul