Results 1 to 3 of 3
Hi,
I have a script which permit to install Qt 3.3.4
But before installing, I want to verify if the user has a newer version else, I install mine.
How ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-29-2005 #1Just Joined!
- Join Date
- Apr 2005
- Location
- Nantes (France)
- Posts
- 1
[shell] compare Qt version
Hi,
I have a script which permit to install Qt 3.3.4
But before installing, I want to verify if the user has a newer version else, I install mine.
How can I do this?
I find the Qt directory (/usr/local/lib/Qt*.*.* or /usr/lib/Qt*.*.*) and I want to compare the end (ex : 3.3.3) with my number version (3.3.4).
I know how take directory name (basename /usr/local/lib/Qt*) but I have a problem to compare with Qt3.3.4.
I don't know how compare these.
If u have any idea !!
Have a nice day
- 04-29-2005 #2Linux Enthusiast
- Join Date
- Jan 2005
- Posts
- 575
You can use the cut command with the -d option to get either
the whole extension or a specific field of the extension.
- 04-29-2005 #3
somehow get the name of the qt directory into the variable 'dir' and then:
Code:version=`echo ${dir#*[a-zA-Z]}`


Reply With Quote
