Re: Expect Scripting

From: Riley Williams (odqa.bvzzj@tdinfo.com)
Date: Sun Jun 10 2001 - 22:42:20 EEST

  • Next message: sds.jksggrik@mail.dy.fi: "SCC driver: interrupt bug in Kernel 2.4?"

    Hi Albert.

    On Thu, 7 Jun 2001, Albert Duane Lawson wrote:

    > I am setting up an ftp script using expect. I've ran into a
    > problem sending the password.
    >
    > Here's the part of the script that expect is having trouble with.....
    >
    > spawn ftp -nv XX.XX.XX.XX
    > expect ftp>
    > send "user wb7awl\r"
    > expect Password:
    > send "$xxxxxx$\r"
    > expect ftp>
    >
    > The actual password begins and ends with $ and expect is trying
    > to read that as a variable. Is there a way to make expect not
    > read that as varibale and send the actual string....???

    I'm not 100% about expect, but most shells allow one to say...

            send "\$password\$\r"

    ...and literalise the character following the \ if it's not an
    alphabetic character. You could try that...

    Best wishes from Riley.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-hams" in
    the body of a message to terhi.victor@logonet.com



    This archive was generated by hypermail 2b30 : Sun Jun 10 2001 - 22:45:05 EEST