One of my favorite things about grabbing things with scripts is just how many ways (and sometimes how needfully or needlessly convoluted you can make them) to grab the same pieces of information. For example, something as simple as what hosts you use to resolve names on a Mac. There are a number of ways to grab what DNS server a device is using in macOS. So when you’re running a script you might choose to grab DNS information one way or another, according to what you’re after. Some of this might seem more complicated than it should be. And that’s correct… resolv.conf The /etc/resolv.conf file is updated automatically to…
-
-
Command Line System Information
When you click on About This Mac and then click on More Info… you see the Apple System Profiler. This tool, dating back to the Classic OS (prehistory so-to-speak) can be used to access a wide variety of information about your system, including installed hardware, software and some settings. Some of this information can also be obtained through other tools. For example, the networksetup command can obtain a wide variety of information about various network settings. But it helps to have one tool to query for any information you may need about a computer (well, much of the information you may need). While it is fairly straight forward to…