Re: howto: open/create a file as executable

2003-03-28 Thread John W. Krahn
Ken Lehman wrote: > > Is it possible to open/create a file with open that does not exist and give > it a umask that makes it executable, say for the purpose of generating shell > scripts? Yes. > For example, say > > open OUT_FILE, MAGIC_UMASK, "/scripts/new_script"; > > where the current umask

howto: open/create a file as executable

2003-03-28 Thread Ken Lehman
Is it possible to open/create a file with open that does not exist and give it a umask that makes it executable, say for the purpose of generating shell scripts? For example, say open OUT_FILE, MAGIC_UMASK, "/scripts/new_script"; where the current umask is 2. Is the only option to chmod the file