Expect Tool

Posted on 2009-12-31
Last Modified: 2013-11-17

I am requested to work on automation for our Solaris platform.

I am suggested to use the Expect tool for this.

I am a newbie to the tool, and I hardly able to find the resources over the net.

I need any kind of help on this like docs, pdfs, links.

Question by:RishiBang
    LVL 84

    Expert Comment

    man expect

    Author Comment


    Sorry for not asking the question in a proper way.

    Actually I want to know the speciality of the Expect tool as we can automate things using shell,perl and other scripting languages.

    What is the exact advantage of using Expect over the above mechanisms.

    LVL 12

    Expert Comment

    In addition to the manpage for expect, here's the expect home page:

    There are links there to a FAQ, to examples, and other useful info.
    LVL 12

    Accepted Solution

    The key use of expect is in scripting interactive sessions.

    For example, you can use expect to script an ftp session, where your script connects to a remote ftp site, waits for a username prompt and then enters the correct username, waits for a password prompt and then enters the correct password, waits for the next ftp prompt and then changes directory to the right place, downloads or uploads a file, and so on.

    Author Closing Comment

    The final answer was very good and I am happy with it.

    Thanks to  larsrohr
    LVL 68

    Expert Comment

    First - the homepage (alas outdated):
    Particularly foööow the "Links to related information" part!

    Wikipedia has a rather good article -

    One of several tutorials -

    Try to search Google for "expect tutorial" - you'll find much more.



    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now