Date: Sun, 16 Feb 2003 22:02:02 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: questions@FreeBSD.ORG Subject: Re: hylafax / faxrcvd script / freebsd Message-ID: <20030216220202.GA1739@happy-idiot-talk.infracaninophi> In-Reply-To: <3E4FFB2B.6050809@intersonic.se> References: <200302161841.h1GIfg026987@lv.raad.tartu.ee> <3E4FFB2B.6050809@intersonic.se>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030216220202.GA1739>
