Please use [code ][/code] (sans the space) tags for source and listings, it's easier to read.
Quote:
Originally Posted by yhcheong
Code:
exec 3>/dev/tcp/${10.x.x.x}/2071
if [ $? -eq 0 ]
then
echo "Telnet accepting connections"
else
echo "Telnet connections not possible"
fi
bash: /dev/tcp/${10.x.x.x}/2071: bad substitution.
|
The ${MACHINE} that I used was in preparation for the loop that you'll need for that many machines (it's substituted by the value of the variable MACHINE)
Change it like this and try again
Code:
MACHINE=10.0.0.1 # Change to what ever you need
exec 3>/dev/tcp/${MACHINE}/2071
if [ $? -eq 0 ]
then
echo "Telnet accepting connections"
else
echo "Telnet connections not possible"
fi