From owner-freebsd-questions Sun Feb 16 14: 2: 9 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBA4937B401 for ; Sun, 16 Feb 2003 14:02:07 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9A3043F3F for ; Sun, 16 Feb 2003 14:02:04 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id h1GM225P001991 for ; Sun, 16 Feb 2003 22:02:02 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id h1GM227n001990 for questions@FreeBSD.ORG; Sun, 16 Feb 2003 22:02:02 GMT Date: Sun, 16 Feb 2003 22:02:02 +0000 From: Matthew Seaman To: questions@FreeBSD.ORG Subject: Re: hylafax / faxrcvd script / freebsd Message-ID: <20030216220202.GA1739@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , questions@FreeBSD.ORG References: <200302161841.h1GIfg026987@lv.raad.tartu.ee> <3E4FFB2B.6050809@intersonic.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E4FFB2B.6050809@intersonic.se> User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-3.3 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_MUTT version=2.44 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Feb 16, 2003 at 09:57:15PM +0100, Per olof Ljungmark wrote: > > If I knew how to pipe the output to a file when the script is running as > called from Hylafax I could probably solve it, right now I can only do > it separately from the command line... Assuming it's a /bin/sh or work-alike script, add the following near the top of the file: exec >/tmp/some-file-name 2>&1 That will redirect stdout and stderr of the script to the named file. Each time the script executes, that file will be overwriten, so you might want to change '>/tmp/some-file-name' to '>>/tmp/some-file-name' to keep a cumulative log of all the script output. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message