I am trying to change certain entries in a file using python, which is possible in Perl with the command below , do we have anything similar in python, here the string in the file is replaced successfully.
[root@das~] perl -pi -w -e 's/unlock_time=1800/#unlock_time=1900/g;' /etc/pam.d/common-auth
For this i did try simple command in python to start off with, but no luck, any help in this direction would help, the code below does not give any output actually.
[root@das~] python -c 'import os ; os.uname()[1]'