Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all, The other day I installed expect using Code: sudo apt-get install expect-tcl8.3 autoexpect was installed with it. I try to run autoexpect by typing: Code: autoexpect ./script_I_wanna_run.sh But ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    23

    autoexpect not working


    Hi all,

    The other day I installed expect using
    Code:
    sudo apt-get install expect-tcl8.3
    autoexpect was installed with it. I try to run autoexpect by typing:
    Code:
    autoexpect ./script_I_wanna_run.sh
    But the output I keep getting when trying to run autoexpect is the following:
    Code:
    /usr/sbin/autoexpect: 1: .TH: not found
    /usr/sbin/autoexpect: 2: .SH: not found
    /usr/sbin/autoexpect: 1: .TH: not found
    /usr/sbin/autoexpect: 2: .SH: not found
    /usr/sbin/autoexpect: 1: .TH: not found
    /usr/sbin/autoexpect: 2: .SH: not found
    Which continues until I ^C to stop it.

    I've tried copying both autoexpect.exp and autoexpect.sh to the /usr/sbin/ folder. I've done chmod +x to both. I'm trying to learn how to use autoexpect, but can't get past the first step of installation

    Thanks for your help and advice,
    James

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    699
    I believe your problem is going to be found in your script, if it is not too large, maybe you can post it and we can help you out.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    23
    I get the same output no matter how I try to run it. For example, running just the autoexpect command by itself, or if I try autoexpect ftp ftp.<mydomain>.com, same .TH & .SH not found output previously quoted above. It leads me to think there's something important I'm supposed to do after installation, somekinda configuration change that needs to be made. I'm not entirely sure.

    I can run the expect command and get a expect1.1> prompt. But as for autoexpect, forget it.

  4. #4
    Just Joined!
    Join Date
    Sep 2008
    Posts
    23
    Guess I answered my own question, in a way...

    installed the autoexpect-dev package, unzipped it into /usr/sbin and did chmod +x to autoexpect.

    Not sure what is was about the expect-tcl8.3 installation that didn't work, but now autoexpect is running as expected.


    James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •