Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-Id: <5.1.0.14.0.20010621111218.00aba110@mail>
X-Sender: superbiskit@mail
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Thu, 21 Jun 2001 11:18:32 -0400
To: ehud@unix.simonwiesel.co.il, Cygwin General MailList <cygwin@cygwin.com>
From: "David A. Cobb" <superbiskit@home.com>
Subject: Re: One dumb question
Cc: cygwin@cygwin.com
In-Reply-To: <200106191558.SAA24155@linux.>
References: <5.1.0.14.0.20010618114229.03d27610@mail>
 <5.1.0.14.0.20010618114229.03d27610@mail>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed

Many thanks to everyone who responded!

I think Ehud wins today's golden biskit award: he discerned that I needed 
to put something IN script "A" which would capture the shell stdout WHILE 
EXECUTING SCRIPT "A".  If I read them right, everyone else would have 
required that I split out the part to be debugged into a separate script.

If I could get rxvt working for me, with its deep buffer, I suppose I 
wouldn't need this.

At 6/19/01 11:58 AM (Tuesday), Ehud Karni wrote:
>On Mon, 18 Jun 2001 11:46:39 -0400, David A. Cobb <superbiskit@home.com> 
>wrote:
> > Is there a way to get the "current" bash shell to tee its output to a
> > logfile?  I remember doing something like this once upon a time but I don't
> > recall what I did and I was using a different shell (ksh on an HP/UX).
>
>You can achieve it by the following 3/4 commands:
>
>exec 3>&1                  # create pipe (copy of stdout)
>exec 1>bash.dbg            # direct stdout to file
>##  exec 2>&1              # uncomment if you want stderr too
>tail -f bash.dbg >&3 &     # run tail in bg
>
>If you don't redirect stderr, the order of stdout and stderr messages
>may be out of original order.
>--
>  Ehud Karni     Mivtach - Simon  Insurance   /"\
>  Tel: +972-3-6212-757 Fax: +972-3-6292-544   \ /  ASCII Ribbon Campaign
>  (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
>      Better     Safe     Than     Sorry      / \
>      mailto:ehud@unix.simonwiesel.co.il    http://www.simonwiesel.co.il

David A. Cobb, Software Engineer, Public Access Advocate, All around nice guy.
Get my PGP key at
:<http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=superbiskit>
Fingerprint=0x{6E3E_DB8C_2E8C_4248_62B2_FE29_08EE_CF0A_3629_E954}
"By God's Grace I am a Christian man, by my actions a great sinner."
--The Way of a Pilgrim, R. M. French [tr.]
<---.----!----.----!----.----!----.----!----.----!----.----!----.---->


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

