Sample Header Ad - 728x90

How to gracefully handle differences in command options between different versions?

0 votes
0 answers
58 views
Inspired by What is the difference between “base64 -b0” in macOS versions prior to macOS 13 (Ventura) and “base64 -i” in macOS 13 (Ventura)? Are there common ways to avoid the script breaking on a system with a different version of a command, at least when you know what the differences are? Would checking the command --version or --help output and calling it with different options make sense?
Asked by typo (249 rep)
Feb 6, 2024, 04:57 AM