# bash: send: command not found

**URL:** <https://forums.suse.com/t/bash-send-command-not-found/24152>\
**Category:** SLES Configure-Administer\
**Created:** [July 12, 2013, 10:38am UTC](https://forums.suse.com/t/bash-send-command-not-found/24152 "2013-07-12T10:38:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramil85](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@ramil85](https://forums.suse.com/u/ramil85)\
**Post date:** [July 12, 2013, 10:38am UTC](https://forums.suse.com/t/bash-send-command-not-found/24152/1 "2013-07-12T10:38:35Z")

</div>

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

thanks in advance

---

<div class="post-metadata">

**Author:** ![mikewillis](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mikewillis](https://forums.suse.com/u/mikewillis)\
**Post date:** [July 12, 2013, 10:54am UTC](https://forums.suse.com/t/bash-send-command-not-found/24152/2 "2013-07-12T10:54:23Z")

</div>

[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?

> [@ramil85;14444](#):
>
> My os: SLES 11 SP1

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

---

<div class="post-metadata">

**Author:** ![ramil85](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@ramil85](https://forums.suse.com/u/ramil85)\
**Post date:** [July 12, 2013, 12:07pm UTC](https://forums.suse.com/t/bash-send-command-not-found/24152/3 "2013-07-12T12:07:45Z")

</div>

my code

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

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [July 12, 2013, 2:11pm UTC](https://forums.suse.com/t/bash-send-command-not-found/24152/4 "2013-07-12T14:11:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [July 12, 2013, 2:17pm UTC](https://forums.suse.com/t/bash-send-command-not-found/24152/5 "2013-07-12T14:17:15Z")

</div>

‘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.
