In article <68be8a270606010218n3753255bi7795a5c15c02c78a@mail.gmail.com>,
Andrew Furey <andrew.furey@gmail.com> wrote:> On 6/1/06, Tony Mountifield <tony@softins.clara.co.uk> wrote:
> > # script /tmp/output.txt
> > Script started, file is /tmp/output.txt
> > # exec asterisk -rvvvvv
> > ... do asterisky stuff ...
> > host*CLI> exit
> > Script done, file is /tmp/output.txt
> > #
>
> Actually you need another exit in there:
>
> # script /tmp/output.txt
> Script started, file is /tmp/output.txt
> # exec asterisk -rvvvvv
> ... do asterisky stuff ...
> host*CLI> exit
> Executing last minute cleanups
> # exit
> Script done, file is /tmp/output.txt
> #
Not if you do "exec asterisk -r" as I did, instead of just
"asterisk -r".
Using "exec" makes asterisk replace the shell that was started by
"script",
and therefore auto-exits when you exit asterisk. That is why I use exec
in that way - it saves me forgetting the second exit and filling up the
script file with rubbish, or even worse, trying to edit it while it is
still active!
Cheers
Tony
--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org