shell - Retrieve bash version in AIX -


after shellshock issue detected on unix systems bash, have create script part of internship in firm in order update bash.

prerequisites installation of updated ibm bash*.rpm are:

  • having bash installed (simple check)
  • having bash version under 4.2.50

i have problem dealing second part, since true bash version given command bash -version instead of rpm -qi bash gives version/release of installation package (and not neccessarily true bash version).

basically, script goes this:

if [[ bash installed ]] ;   if [[ bash version installed < 4.2.50 ]] ;     install bash version 4.2.50   fi fi 

bash -version returns lot of text, , pick out bash version.

so far, i've used following command:

$ bash -version | grep version | awk '{print $4}' | head -n 1 

that returns :

4.2.50(1)-release 

is there way retrieve real bash version? i've played around sed command no success.

seems you're trying output this,

$ bash -version | awk -f'[ (]' '/version/{print $4;exit}' 4.3.11 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -