2017 shaares
45 private links
45 private links
1 result
tagged
script
Yatta !!!
!/bin/bash
function nextIP {
for i in {"1","2","3","4"};do
eval digit$i=$(echo $1| cut -d'.' -f$i)
done
for i in {"4","3","2","1"};do
if [ $(eval echo "\${digit$i}") -lt 255 ];
then
let digit$i=$(eval echo "\${digit$i}")+1
IP="$digit1.$digit2.$digit3.$digit4"
return 0
else
let digit$i=0
fi
done
return 1
}
nextIP $1
echo $IP