why this simple python script not print the real redhat version?
version = os.system( ' cat /etc/redhat-release | awk \'{print $7}\' ' )
print ("my version is " ,version)
when I run it
we got:
7.2
('my version is ', 0)
- why we get 0 instead 7.2?
- how to avoid to get version - 7.2 from os.system ?