Create text file with content in Linux

I’m still trying to figure out why it is working on Windows and not in Linux. :confused:

Could you evaluate the following relevance clauses via QNA (/opt/BESClient/bin/qna) on the target Linux machine?

Q: exists file “/etc/yum.repos.d/ibm-repository.conf”

Q: exists lines whose (it as string as lowercase contains “enabled=1”) of file “/etc/yum.repos.d/ibm-repository.conf”

Q: lines (integers to (line number of lines whose (it as string as lowercase contains “enabled=1”) of it - 1)) of file “/etc/yum.repos.d/ibm-repository.conf”

My mistake, I never notice that the path is incorrect :sweat:

Will post the result once done. Thanks Aram!

It’s working now. Thanks Everyone for your help! :grin:

2 Likes

I may be a bit late to the game, but what about a simple sed command?

wait bash -c "sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/ibm-repository.conf"

1 Like

Better late than never… :smile:

Will try than too. Thanks masonje!