mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-24 04:26:30 +08:00
MacOS: sw_vers
This commit is contained in:
parent
7b85fba0bd
commit
fd559e2de4
1 changed files with 2 additions and 0 deletions
|
@ -499,6 +499,8 @@ These are items relevant *only* on MacOS.
|
|||
|
||||
- Be aware MacOS is based on BSD Unix, and many commands (for example `ps`, `ls`, `tail`, `awk`, `sed`) have many subtle variations from Linux, which is largely influenced by System V-style Unix and GNU tools. You can often tell the difference by noting a man page has the heading "BSD General Commands Manual." In some cases GNU versions can be installed, too (such as `gawk` and `gsed` for GNU awk and sed). If writing cross-platform Bash scripts, avoid such commands (for example, consider Python or `perl`) or test carefully.
|
||||
|
||||
- To get MacOS release information, use `sw_vers`.
|
||||
|
||||
|
||||
## More resources
|
||||
|
||||
|
|
Loading…
Reference in a new issue