One command to create a new script file and give it executable permission (touch & add bash shebang & chmod +x)
- Create new file:
touch <filename>
- Add shebang:
echo "#!/bin/bash" > <filename>
- Make it file executable:
chmod +x <filename>
$ touch-x <filename>
Install with basher
$ basher install alexander-mart/touch-x
curl -s https://raw.githubusercontent.com/alexander-mart/touch-x/main/bin/touch-x | bash -s install
wget -qO - https://raw.githubusercontent.com/alexander-mart/touch-x/main/bin/touch-x | bash -s install
Make each program do one thing well.
To do a new job, build afresh rather than complicate old programs by adding new "features".
-- Douglas McIlroy
See more: en.wikipedia.org/wiki/Unix_philosophy
-
Explore other unix-philosophy projects on GitHub
-
Please use a badge if your project follows the same principles:
![Static Badge](https://img.shields.io/badge/topic-unix--philosophy-blue?logo=github&link=https%3A%2F%2Fgithub.com%2Ftopics%2Funix-philosophy)
- check if file exist then exit
- add bash shebang by default
- add any shebang from library (
sh
,python3
, etc...) with not requried parameter-s|--shebang=<shebang>
- Make Linux/Unix Script Portable With #!/usr/bin/env As a Shebang
- awesome package manager support:
ls -s ./bin/touch-x ./touch-x
- 🦁 rugit — run command & semantic git commit it