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
server3
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
server3