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.



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 [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to