Тема: uname
-
Detecting the operating system from a script: uname, os-release, sw_vers, oslevel and a fallback order
A portable script needs a reliable way to branch on operating system and version before running an OS-specific command from any of the other articles in this series. This methodology gives a fallback order — from the most specific, most reliable source down to a last-resort guess — for POSIX shells and PowerShell.
Машиночитаемо: JSON