minus-squarekayaven@lemmy.worldtoLinux@lemmy.ml•*Permanently Deleted*linkfedilinkarrow-up7·1 year 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. linkfedilink
minus-squarekayaven@lemmy.worldtoTechnology@lemmy.world•Google’s CEO faces employee questions about layoffs — “Why has there been such an extraordinary effort to limit the internal visibility of layoffs announcements?”linkfedilinkEnglisharrow-up6·1 year agoArchived version: https://archive.is/jJAMw linkfedilink
You 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.