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?
configure
scripts of a lot of software do (based on autoconf). Run a bunch of commands with different options and test inputs to determine which particular toolset and release they have.