mg.sh
learn_programing
mg.sh | learn_programing | |
---|---|---|
1 | 1 | |
0 | 0 | |
- | - | |
0.0 | 10.0 | |
about 1 month ago | about 2 years ago | |
Shell | ||
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mg.sh
-
Shell Script Best Practices, from a decade of scripting things
I agree, getting to know where a script "comes from" can be complex though. You can `readlink -f` (or equivalent) in many cases, but when implementing a library this might not be entirely practical. I have had to rely on this ugly if-statement [1] for that purpose.
[1]: https://github.com/Mitigram/mg.sh/blob/cbeb206d67fe08be2107deee50acf877f990dbdf/bootstrap.sh#L6
learn_programing
-
Shell Script Best Practices, from a decade of scripting things
> Don't you find its syntax cumbersome?
Not really; just seems the same as most other dynamic languages. Awk does a lot of stuff for you (the "implied loop" your program runs in, field splitting) that's certainly possible (even easy) to replicate in Python or Ruby, but Awk it's just so much more convenient.
I use it for things like processing the Unicode data files, making some program output a bit nicer (e.g. go test -bench), ad-hoc spreadsheets, few other things. I got started with it as I needed to process some C header files and the existing script for that was in Awk; it worked pretty well for that too.
The Awk Programming Language book is pretty good. GNU Awk has a bunch of very useful extensions, but pretty much everything in the book still works and is useful today. You can get it at e.g. https://archive.org/details/awkprogrammingla00ahoa or https://github.com/teamwipro/learn_programing/blob/master/sh...
The GNU Awk docs are also pretty decent.
What are some alternatives?
bash-modules - Useful modules for bash
zx - A tool for writing better scripts
pip - The Python package installer
isort - A Python utility / library to sort imports.
jc - CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
nushell - A new type of shell
dmenu-scripts - Serious fun with dmenu
rq - Record Query - A tool for doing record analysis and transformation
yq - yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor
shellcheck-repl - Validation of Shell Commands Before Evaluation
Command-line-text-processing - :zap: From finding text to search and replace, from sorting to beautifying text and more :art: