From owner-freebsd-questions Mon Feb 19 13:32:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from fox.amnesty.org (fox.amnesty.org [194.131.159.110]) by hub.freebsd.org (Postfix) with ESMTP id 1624837B491 for ; Mon, 19 Feb 2001 13:32:30 -0800 (PST) To: freebsd-questions@freebsd.org Subject: Redirecting STDERR from within the script MIME-Version: 1.0 X-Mailer: Lotus Notes Release 5.0.6a January 17, 2001 Message-ID: From: falbu@amnesty.org Date: Mon, 19 Feb 2001 21:31:28 +0000 X-MIMETrack: Serialize by Router on fox/I.S./Amnesty International(Release 5.0.5 |September 22, 2000) at 19/02/2001 21:32:53, Serialize complete at 19/02/2001 21:32:53 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello gurus, I was wondering if there's a way you can redirect stderr from within the shell script that is running. For example, I have a shell script that I want to debug on a different terminal. At a certain point in the script I want to start redirecting the stderr to /dev/ttyv1 and after that turn on debugging (set -x). In my particular scenario it is _not_ possible to run the script from the begining with the stderr redirected, like: myscript 2>/dev/ttyv1 Many thanks, Florentin Albu Client-Server Systems Manager falbu@amnesty.org _________________________________________________________ Amnesty International, International Secretariat visit us at http://www.amnesty.org Be Realistic! Plan for a Miracle! ONE click to stamp out torture. http://www.stoptorture.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message