Article 5SAEM error when running this script... any idea?

error when running this script... any idea?

by
sam_nyc
from LinuxQuestions.org on (#5SAEM)
Hi,

Code:#!/bin/bash
for N in $(cat /root/nodelist); do
printf "$N "
IPMI=`scyld-nodectl -i $N ls -l | egrep 'serial|power_uri'`
else
printf "can't connect"
fi
doneError message I get

Code:/get_serial_power.sh
./get_serial_power.sh: line 9: syntax error near unexpected token `else'
./get_serial_power.sh: line 9: ` else'on /root/nodelist
Code:server1
server2
server3latest?d=yIl2AUoC8zA latest?i=pLq3CyqjnE4:4SFklrXHbRY:F7zBnMy latest?i=pLq3CyqjnE4:4SFklrXHbRY:V_sGLiP latest?d=qj6IDK7rITs latest?i=pLq3CyqjnE4:4SFklrXHbRY:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments