- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Alternate for expect.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2002 08:09 AM
тАО10-29-2002 08:09 AM
We use expect to automate Interactive installations. Are there any other products which would work on hp-ux other than expect? Please advise.
Thanks
Ben.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2002 08:26 AM
тАО10-29-2002 08:26 AM
Re: Alternate for expect.
When you say "Interactive", is this a product or just the word "interactive" applied to installs, and if so, what kind of installs? Software, OS, ... ??
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2002 09:20 AM
тАО10-29-2002 09:20 AM
Re: Alternate for expect.
Are you asking:
"What's my choice of scripting languages within the HP-UX environment as an alternative to Expect?"
If so - what's your criteria?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2002 09:31 AM
тАО10-29-2002 09:31 AM
Re: Alternate for expect.
perl can be used to mimic Expect. If you want perl to behave pretty much like expect, there is a module available on CPAN, called ... tada ... Expect :)
http://search.cpan.org/author/RGIERSIG/Expect-1.15/
Expect::Simple is even more simple
http://search.cpan.org/author/DJERIUS/Expect-Simple-0.02/Simple.pm
use Expect::Simple;
my $obj = new Expect::Simple
{ Cmd => "dmcoords verbose=1 infile=$infile",
Prompt => [ -re => 'dmcoords>:\s+' ],
DisconnectCmd => 'q',
Verbose => 0,
Debug => 0,
Timeout => 100
};
$obj->send( $cmd );
print $obj->before;
print $obj->after;
print $obj->match_str, "\n";
print $obj->match_idx, "\n";
print $obj->error_expect;
print $obj->error;
$expect_object = $obj->expect_handle;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2002 09:43 AM
тАО10-29-2002 09:43 AM
Re: Alternate for expect.
Thanks. Yes i meant the word "Interactive".
Is this a wrapper or a perl module?
Thanks
Ben
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2002 01:16 AM
тАО10-30-2002 01:16 AM
SolutionAny module/script in perl can be made interactive, just insert the right statements at the right points.
I don't know if it's a wrapper around the `real' expect, but knowing what kind of modules normally found on CPAN, I would guess it's just a re-implementation. It's not that hard to do using a few scattered select calls. Just read the readme. Start with Bundle::Expect:
--8<---
NAME
Bundle::Expect - Everything that Expect.pm needs
SYNOPSIS
perl -MCPAN -e 'install Bundle::Expect'
CONTENTS
Expect
IO::Stty
IO::Tty
IO::Pty
DESCRIPTION
Everything that Expect.pm needs. What can I say more?
AUTHOR
Roland Giersig
-->8---
Expect.pm v1.14
===============
Expect requires the latest version of IO::Tty, also available from
CPAN. IO::Stty has become optional but I'd suggest you also install
it. If you use the highly recommended CPAN module, there is a
Bundle::Expect available that installs everything for you.
If you prefer manual installation, the usual
perl Makefile.PL
make
make test
make install
should work. I finally started a testsuite for Expect, but it doesn't
really test anything deeper right now. The problem is to find some
external program to use for generating reproducible output that is
available across all platforms. Luckily, we can always use perl
itself... Contributions to the testsuite are of course welcome.
Note that IO::Tty is very system-dependend. It has been extensively
reworked and tested, but there still may be systems that have
problems.
The Perl Expect module was inspired more by the functionality of
Tcl/Expect than any previous Expect-like tool such as Comm.pl or
chat2.pl.
The Tcl version of Expect is a creation of Don Libes (libes@nist.gov)
and can be found at http://expect.nist.gov/. Don has written an
excellent in-depth tutorial of Tcl/Expect, which is _Exploring
Expect_. It is the O'Reilly book with the monkey on the front. Don
has several references to other articles on the Expect web page.
I try to stay as close to Tcl/Expect in interface and semantics as
possible (so I can refer questions to the Tcl/Expect docu).
Suggestions for improvement are always welcome.
[Latest rumours have it that Don plans a rewrite of Expect as a
stand-alone library that can be easily embedded into various scripting
languages.]
There is now a FAQ section in the pod, complete with examples, so
please let me know if there's something you'd like to see answered
there that isn't.
There are two mailing lists available, expectperl-announce and
expectperl-discuss, at
http://lists.sourceforge.net/lists/listinfo/expectperl-announce
and
http://lists.sourceforge.net/lists/listinfo/expectperl-discuss
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2002 08:01 AM
тАО10-30-2002 08:01 AM
Re: Alternate for expect.
I use expect for several scripts at work. I personally don't know of another program to replace it. I know that (Red Hat) Linux uses kickstart to automate system installs. I am not aware of anything HP has to do the same though.