Avatar of peledc
peledc
 asked on

Bash string manipulation

On RHEL, version 5.4 and above,
I would like to extract and match the OCFS2 version with the Linux version:

#uname -r
  retruns:  2.6.18-371.3.1.el5PAE

# rpm -qa | grep ocfs
returns two rows:
  ocfs2-2.6.18-238.el5PAE-1.4.7-1.el5
  ocfs2-tools-1.4.4-1.el5

I need to find if the versions match:
 2.6.18-371.3.1.el5PAE with 2.6.18-238.el5PAE (This is from rpm cmd between the two "-")

Thanks
Linux

Avatar of undefined
Last Comment
peledc

8/22/2022 - Mon
SOLUTION
xterm

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
peledc

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
peledc

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
xterm

Sorry, I didn't have ocfs2-tools installed anywhere to test with.  Nice work getting what you needed though!
peledc

ASKER
My comment best fit this scenario

Thanks for the help.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck