Created
October 9, 2010 20:37
-
-
Save kd7lxl/618579 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in case of chmod -x /bin/chmod | |
from sys import argv | |
from os import chmod, stat | |
from stat import S_IEXEC | |
def chmodx(filename): | |
chmod(filename, stat(filename).st_mode | S_IEXEC) | |
if __name__ == "__main__": | |
for filename in argv[1:]: | |
chmodx(filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment