how to create a file and make it executable in one command?

https://lemmy.ml/post/15185955

how to create a file and make it executable in one command? - Lemmy

I am tired of creating a file with nano, saving it and then making it executable. Is there a command that makes it in one step?

You want the install command.

install

Using Install Command in Linux

The install command lets you copy file with advanced parameters. See some examples in this article.

Linux Handbook
touch file && chmod +x file is good but this here is the one true command for the purpose.
install -m755 /dev/null target was the first thing I thought of. I would never use this but it is a single command.
Why would you never use it?
I’m going to write (at least part of) the script first anyway, and then I can just use chmod +x after the file is saved which is shorter.