Re: navigation through (sql)menu by commandos

From: Tim X <timx_at_spamto.devnul.com>
Date: 05 Dec 2002 09:03:01 +1100
Message-ID: <87smxde92i.fsf_at_blind-bat.une.edu.au>


"Ronald" <ra.veloo_at_wanadoo.nl> writes:

> Tim,
>
> You got it right!
> I just want to perform some action within an application in a scheduled
> fashion.
> The UNIX type I am using is AIX from IBM. So, I do have to look for some
> manual concerning scripting language, isn't it?
Have a look at

http://expect.nist.gov/

for some info about TCL Expect. Also, if you know perl, there is an expect module for perl which gives it the same capability. Expect is based on TCL (Tool Command Language) and is a pretty simple scripting language, but quite powerful. Its original goal was to provide a scripting language which could be used as the "glue" between other utilities, but was a bit easier to work with than basic shell scripting.

The Expect extension to TCL provides a handy way to run interactive text like applications. You setup and "expect" block which looks for prompts or some form of output from the interactive program and when you find a match you "send" some input to the interactive process. You can use either regular expressions or shell glob type matching in your expect block.

Although I have not used it with SQL*PLUS, I think it will work find - another advantage of SQL*PLUS - due to its clear and simple interface, this sort of thing is easy to do. Wouldn't be possible if it had a gui or more complex UI. Expect is available for most flavors of UNIX and windows.

-- 
Tim X.
tcross (at) northnet com au
Received on Wed Dec 04 2002 - 23:03:01 CET

Original text of this message