Can someone review my code tell me where I am going wrong?

Started writing my code.

my read input is not even asking nor working?

And I get a EOF script error.

echo "1) aragorn.domain.net"
echo "2) marvel.domain.net"
echo "3) athena.domain.net"
echo "4) gandalf.domain.net"
echo "5) griffin.domain.net"

echo "What server would you like to connect to?(1-5)
read input

if [$input=1]
 then
ssh aragorn.domain.net
elif [$input=2]
 then

ssh marvel.domain.net

elif [$input=3]
 then
ssh athena.domain.net

elif [$input=4]
 then
ssh gandalf.domain.net

elif [$input=5]
 then
ssh griffin.domain.net
else
        echo"wrong choice"
fi

You need spaces:

[$input=1]

should be

[ $input = 1 ]

By the way, another way to do what you are trying to do would be to use "select":

set -A domain aragorn.domain.net marvel.domain.net athena.domain.net gandalf.domain.net griffin.domain.net
PS3="What server would you like to connect to? (1-5): "
select mydomain in ${domain[*]}
 do
  ssh $mydomain
  break
done
1) aragorn.domain.net                            
2) marvel.domain.net                             
3) athena.domain.net                             
4) gandalf.domain.net                            
5) griffin.domain.net                            
What server would you like to connect to? (1-5): 

$mydomain will be the domain, and $REPLY will be the number chosen by the user.

I have the if commands working now.

Suppose that I wanted to include a command such as

if [ "$X" = "quit" ]; then

what would follow the then that would close out the script without error, if underneath that you did have many more else if statements?

chris

You'd just need to exit then:

exit 0