getInternalIP()
I am getting IP from handler, I want to get this into string or text and
then further create new folder and then give this IP as foldername
on getInternalIP()
repeat with interface from 0 to 5
try
set myIP to word 2 of (do shell script "ifconfig en" & interface & " | grep 'inet '")
set result_check to true
on error
set result_check to false
end try
if result_check then exit repeat
end repeat
if interface is 5 then
return "unknown"
else
return myIP
end if
end getInternalIP