I need a script to check if yad (and other programs) version number is >= to a specific number. For example I have:
$ yad --version
0.40.0 (GTK+ 3.24.8)
$ gedit --version
gedit - Version 3.32.0
$ bash --version
GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
- For yad new features are added between Ubuntu 16.04 and 19.04
- For gedit the ability to pass Window geometry is lost in newer versions
- bash complicates tests as the version number is in the middle of the first line.
An environment variable will not exist for all programs like bash has:
$ echo $BASH_VERSION
5.0.3(1)-release