
November 23rd, 2010, 04:45 PM
|
|
Registered User
|
|
Join Date: Nov 2010
Posts: 4
Time spent in forums: 51 m 58 sec
Reputation Power: 0
|
|
|
Conditional sentence of the first two bits
Hello, maybe anyone know, how to compare first two/three bits of IP address in conditional sentence?
for e.g
I have an ip A:
A=`192.23.43.132`
#know i need to check if it is an ip starting by 192.23, so how to determine it by first bits?
#if [$A= '192.23....'] ???
then
echo "true"
else
echo "false"
fi
|