PDA

View Full Version : Need Help with Expect



KamakazieX
September 27th, 2011, 11:47 AM
I'm trying to convert a hostname to ip and resolve the ip's netmask and subnet information with bash/shell scripts and pass them to expect:

set mgtip [open |"[/usr/bin/host $fobject.some.domain.com |cut -f4 -d' ']"]
set mgtipm [open |"[/u/lmatthew/bin/netinfo $mgtip && printf "-addr=$IP -mask=$MASK -gw=$GW"]"]
send_user "Netboot using $mgtif with $IP on VLAN$VLAN ($OWNR)."

I get an error for "invoked within". How do I get around this so I can get automating!!

Thanks,

-Matt

KamakazieX
October 3rd, 2011, 07:13 AM
bump :popcorn: