bash: send: command not found

i trying to write shell but appears error: “bash: send: command not found”. My os: SLES 11 SP1

thanks in advance

[QUOTE=ramil85;14444]i trying to write shell but appears error: “bash: send: command not found”.
[/QUOTE]
Can you post the script in question (wrap it in CODE tags to make it readable), or if it’s really long, just the relevant part? Can you tell us more about what you’re trying to do and why you expect there to be a command called send?

Are you aware that support for SP1 ended in August of 2012? SP3 has just been released.

my code

spawn ssh $REMOTE_USER@$REMOTE_HOST 'bash -s' < $SHELL_NAME match_max 100000 expect "Password:" send "$PASSWORD\\r" send "\\r"

Hi ramil85,

it looks like you’re having an “expect” script there, not a bash shell script.

from “man 1 expect”:

[QUOTE]USAGE
Expect reads cmdfile for a list of commands to execute. Expect may also be invoked implicitly on systems which support the #! notation by marking the script executable, and making the first line in your script:

       #!/usr/local/bin/expect -f

   Of course, the path must accurately describe where Expect lives.  /usr/local/bin is just an example.[/QUOTE]

Regards,
Jens

‘send’ is a command interpreted by expect. Putting it in your bash script
means you are trying to get ‘bash’ to interpret it. Instead you probably
need to be pushing these commands into a file and then calling expect with
that file as an argument so that it parses the commands.

Good luck.