kayaven@lemmy.worldtoLinux@lemmy.ml•how to create a file and make it executable in one command?
13·
5 months agoYou could define a function that takes a parameter, which touches a file with the parameters value, chmods it and then opens it with nano?
create_exec() {
touch "$1"
chmod +x "$1"
nano "$1"
}
Then you could type create_exec file.sh
and it would do the rest for you.
I’d like to think that Ram Ranch is the sole reason for this correlation.