I'm creating a little script to allow quick changes to the network settings of my Mac. I have got it all working, but I wanted to be able to see what the settings are before I change them in the first dialog pop up.
The command that gets this information is "networksetup -getinfo device"
The result is like this:
Manual Configuration --This may also say DHCP Configuration--
IP address: 192.168.0.100
Subnet mask: 255.255.255.0
Router: 192.168.0.1
IPv6: Automatic
IPv6 IP address: none
IPv6 Router: none
Ethernet Address: (null)
How can I get the IP address, Subnet mask and Router as 3 variables in my script so I can output them to the user over the following prompts?