I’m using "ipconfig getpacket en0 ;ipconfig getpacket en1 " to find the current domain of the machine. The interesting line is:
domain_name (string): acme.com
Works fine in bash, but returns (error 1) (despite actually working and bringing back the results)
I’d much rather do something more elegant. I’ve had a look in the “System Events” dictionary but the only mention of domain is all about user and system folders
I could, of course, use “scutil --dns” which also brings back the current host
However, I’d like to avoid bash if possible