Shell Scripting to be done for verifying the software version and also not to update
-
To delete Firefox, you delete it. It is that simple. You use "rm" like deleting any other file because when you copy, instead of installing, Firefox, it is just a file. So just remove it.
-
@scottalanmiller First I am testing whether the above mentioned command works properly to compare the version of the firefox and after that i will check the status of the firefox in the system(ubuntu)
-
You don't test a script without a proper use case of how it would work. For all intensive purposes you don't have a script at this point.
-
@thecreativeone91 Yes.Then how can I do now.Can you give any idea
-
@Lakshmana said:
@scottalanmiller First I am testing whether the above mentioned command works properly to compare the version of the firefox and after that i will check the status of the firefox in the system(ubuntu)
And, like we've said since the beginning, no, it does not.
-
@Lakshmana said:
@thecreativeone91 Yes.Then how can I do now.Can you give any idea
We don't know. You must answer the questions that I stated at the beginning. Right now you haven't decided what the script is supposed to do. So since you haven't decided what it will do yet, how can we help you do something?
-
@scottalanmiller said:
do. So since you haven't decided what it will do yet, how can we help you do something?
Please wait?
-
@Lakshmana said:
@scottalanmiller said:
do. So since you haven't decided what it will do yet, how can we help you do something?
Please wait?
Sure, just sit down and figure out the goal. What do you want the script to do. We can help you once you know what the goal is.
And whatever you do, stop using the word "installed" because we are not dealing with software installation here and this is throwing you off considerably.
-
@scottalanmiller Please read the information and if information is not relevant means please inform me.
My overall goal is to write the script for the ubutu 14.04 LTS 64 Bit OS.
The script has to check the version status of the firefox and java .
The overall aim is that the firefox and java has to be present in the specific version at Ubuntu.
The auto update will be stopped for firefox by GUI.
If the firefox or java version updated after this means the script should be runned automatically to uninstall the newer version of firefox or java from the machine and then the specific version Firefox 31.0 and java 1.7.0_65 needs to be installed at the system in background without the user interference.
-
@Lakshmana said:
The overall aim is that the firefox and java has to be present in the specific version at Ubuntu.
So answer the original questions:
- Are you looking to see only that the right version exists?
- What do you want to do about other versions?
- How do you want to define the right version being there?
-
@Lakshmana said:
If the firefox or java version updated after this means the script should be runned automatically to uninstall the newer version of firefox or java from the machine and then the specific version Firefox 31.0 and java 1.7.0_65 needs to be installed at the system in background without the user interference.
You are back to using "install" again. You can't uninstall or install, you learned this over and over already. Why do you keep reverting to these terms when they don't apply here and are very much causing you to be confused?
-
If you want to remove a version that is not the correct one, you delete it. In Linux we delete with the rm command. It's that simple.
-
@scottalanmiller Yes.I am looking to see only the right version.
Other version should be exist in this system if exists means it should be automatically removed from the concerned path automatically
.I define the right version is there by comparing the version present at the path where the software is present. -
@Lakshmana said:
@scottalanmiller Yes.I am looking to see only the right version.
How do you plan to look for other versions?
-
@scottalanmiller In my test machine the firefox updated automatically to 38 version.This was happened after stopping updates at GUI of the firefox.So only I am trying to remove the other version from the system.
-
@Lakshmana said:
.I define the right version is there by comparing the version present at the path where the software is present.
That's an odd definition. Doesn't really match what you state that you want to do. Presumably if there were multiple versions or different versions present they would be at different paths.
This implies the opposite of wanting to know if there are multiple versions.
-
@Lakshmana said:
@scottalanmiller In my test machine the firefox updated automatically to 38 version.This was happened after stopping updates at GUI of the firefox.So only I am trying to remove the other version from the system.
Did it change the path?
-
@scottalanmiller No the path was not changed.
-
@Lakshmana said:
@scottalanmiller No the path was not changed.
Okay, so if the goal is to make sure that the binary at the one specific path has not changed versions is a bit more clear of a goal.
-
@scottalanmiller I went through the same set of instructions that he used. And when you run the Firefox v31 binary, it automatically updates to the latest version (although I did not run the application as root, so I am uncertain how it did this, lol).