2
1
As part of a plist I'm writing for OS X, I need to execute the "say" command if a wireless network is successfully deleted using:
networksetup -removepreferredwirelessnetwork
If a network isn't deleted, it echos:
Network (network name) was not found in the preferred networks list
I currently have:
networksetup -removepreferredwirelessnetwork en1 && say "Network deleted"
(where en1
is the network interface name),
but that still says "Network deleted" even if a network is not deleted.
Thoughts?