Take the 2-minute tour ×  My command line/bash fu is extremely
weak, but I'm trying to hone my abilities. Hopefully someone can
help.  I wrote a super simple expect script so that I can SSH in
to a headless box we're using at work, while also sending in the
password (for reasons that I am unable to expand upon, we can't
use public keys to automate logging in). The script:
#!/usr/bin/expect -f set timeout 30 spawn ssh -X ***@ $argv
match_max 100000 expect "*?assword:*" send -- "***\r"  The box
has a developer environment and Eclipse installed; most of the
time that I'm connecting to it, I will end up tunneling straight
in to Eclipse to work on some code that we keep on this box, so
I usually end up using script eclipse.  How can I pass the &
flag in to expect so that it sees the ampersand as an argument
for the ssh session I'm spawning ? When I use script eclipse &
it just backgrounds script on my machine instead of doing
something on the remote machine, but I'd like to be able to send
the & in to script so t