Create somefile and get permissions (644)
$ echo"x"> somefile
$ stat -c "%a %n" somefile644 somefile
run PythonSed in place and get permissions:
$ python3 -c "from PythonSed import Sed; sed = Sed(in_place=''); sed.load_string('s/x/y/'); sed.apply('somefile')"
$ stat -c "%a %n" somefile600 somefilePermissions are changed to 600
Create
somefileand get permissions (644)run
PythonSedin place and get permissions:Permissions are changed to
600