Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Bash-Snippets: A collection of small bash scripts for heavy terminal users (github.com/alexanderepstein)
2 points by gautamsomani on Dec 17, 2021 | hide | past | favorite | 1 comment


I guess this is OK for beginner developers, but for the long-term, I recommend only using repos like this for inspiration, and not for daily use.

Take a look at this script for example: https://github.com/alexanderepstein/Bash-Snippets/blob/maste... -- 257 lines, self-update function, tricks for functionality, a few encoding bugs. Instead, if you are sure you have "curl" installed, this entire thing can be made into 1-line script:

    curl qrenco.de/"%*"
Sure, this 1-line cannot handle missing "curl" nor can it produce PNGs... but then it is way easier to understand, fix and enhance. And if you need PNGs, write another tiny script to make those. After all, shell scripts is all about customization and glue logic -- much better to leave "business logic" to other programming languages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: