Applescript - Get information from terminal command
I've whipped up this nice code snippet, try it out, it should work well for your specific application.

set device to "Ethernet"

set getInfo to paragraphs of (do shell script "networksetup -getinfo " &amp; device)
set ipAddress to ((item 2 of getInfo) as string)
set subnetMask to ((item 3 of getInfo) as string)
set router to ((item 4 of getInfo) as string)
-- You could use the output here, and remove the rest of the script, or continue to remove the excess wordage.

set ipAddress to ((characters 13 through -1 of ipAddress) as string)
set subnetMask to ((characters 14 through -1 of subnetMask) as string)
set router to ((characters 9 through -1 of router) as string)