I'm trying to find a way to set default permissions for newly created files in a specific directory.
I have a directory called scripts, in which I write scripts while I teach myself shell scripting and python. I need all these scripts to be executable. Right now I do it at file creation:
touch newfile && chmod +x newfile && vi newfile
What I'd like to do is set the default permissions so that any new file created under the scripts directory is automatically executable. I've read info on umask, but if I understand it correctly, that would make all new files executable, not just the ones under scripts.
Is there a way to set default permissions for new files under a specific directory?