I am trying to check for information on Linux server,if it has certain disks named 'ocr'. So I have run a shell command and capture the output in a text file. Then I will search for the string in the file.But this below script doest work.
import os
myCmd = os.popen('ls /dev/asm|grep ocr').read()
print(myCmd)
with open('myCmd') as f:
if 'ocr' in f.read():
print("RAC server")