Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j1elo/shell-snippets
Some Bash shell snippets, with functions and utilities that I use frequently in my scripts.
https://github.com/j1elo/shell-snippets
Last synced: 2 months ago
JSON representation
Some Bash shell snippets, with functions and utilities that I use frequently in my scripts.
- Host: GitHub
- URL: https://github.com/j1elo/shell-snippets
- Owner: j1elo
- License: mit
- Created: 2017-12-22T16:44:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-07-18T09:56:50.000Z (over 2 years ago)
- Last Synced: 2024-11-01T03:53:23.147Z (2 months ago)
- Language: Shell
- Homepage:
- Size: 28.3 KB
- Stars: 49
- Watchers: 0
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shell-snippets
Sample Bash scripts that follow best practices learnt from a variety of sources.
## Sources
These are some good resources with tips on how to write good-quality shell scripts:
- [Shell Scripts Matter](https://dev.to/thiht/shell-scripts-matter), proposes a template that you can use for all your scripts.
- [Writing robust Bash shell scripts](http://www.davidpashley.com/articles/writing-robust-shell-scripts) is another detailed article about safety measurements in Bash scripts.
- [Common shell script mistakes](http://www.pixelbeat.org/programming/shell_script_mistakes.html) completes the pack with even more recommendations.It is wise to follow the recommendations of more experienced players, because they have already fought some battles that you still haven't even anticipated:
- [Google´s shell style guide](https://google.github.io/styleguide/shell.xml)I also like a couple of pages with examples and description of common errors that Bash programmers make:
- [Bash pitfalls](http://mywiki.wooledge.org/BashPitfalls)
- [The Bash Hackers Wiki](http://wiki.bash-hackers.org)Last but not least, **always use this tool to verify your scripts**: **[ShellCheck](https://www.shellcheck.net)**. It can be installed as a plugin in lots of text editors and IDEs.
Happy coding!