[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interactive Expect from bash Script

From: Bob Proulx
Subject: Re: Interactive Expect from bash Script
Date: Sat, 29 Mar 2014 15:09:46 -0600
User-agent: Mutt/1.5.23 (2014-03-12)

Esben Stien wrote:
> export _csv=`python <<'END'

As you have already discovered this is the source of your problem.

> /usr/bin/expect<<'EOF'

Times two, nested.

The bash documentation says:

   Here Documents
       This type of redirection instructs the shell to read input from
       the current source until a line containing only delimiter (with
       no trailing blanks) is seen.  All of the lines read up to that
       point are then used as the standard input for a command.

Since you are using stdin for the here-document then the file
descriptor associated with it will return EOF since it will already
have read to the end of the file.

> spawn /usr/bin/ssh address@hidden

The above will then always get EOF from the here-document file which
has already been read to the end of file.

This type of question is really better placed in the help-bash mailing
list rather than the bug-bash mailing list.  The help-bash list is
relatively new and so we are always reminding people to use it when


reply via email to

[Prev in Thread] Current Thread [Next in Thread]