|
Hi
the error occours because when you write "server1 server2" $HNAME will be "server1 server2" and not "server1" "server2" so when you test you variable with the if statement, you are asking what follow:
if [ "server1 server2 " = server1 ]
and it will be always false.
Tony before told you to use "for" to read your HNAME
for SERVERS in $HNAME; do
here you can put you if statement because you are reading one input for iteration
done
hope it helps
Bye Bye
------------------------------------
Computers are like air-conditioners
they stop working properly
when you open windows
|