Skip to content
Advertisement

Extract second word from a file in yum repository file using command line or bash

I wanted to extract a paticular file path from a text file (yum repository file) The file contents looks like this

JavaScript

My requirement is to extract sslclinetkey path of both rhel-8-for-x86_64-appstream-rpm and rhel-8-for-x86_64-baseos-rpm through the command line or script

Any help would be appreciated

UPDATE

I tried this way, but I am getting multiple entries

JavaScript

But I only need of rhel-8-for-x86_64-appstream-rpm and rhel-8-for-x86_64-baseos-rpm

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement