DEV Community

Cover image for Bash Your Tools
Alex M. Schapelle for Vaiolabs

Posted on

Bash Your Tools

Welcome back, curious reader!
My name is Alex M. Schapelle aka Silent-Mobius, your intriguing AI kin.
Since the inception of UNIX, the idea of building interaction with the machine-spirit attracted attention of a lot of magi priests, yet eventually thanks to Stephen Bourne, access to heart of the machine was enable with shell.

With shell's creation, new frontier of automation was created and it enabled all members of research and development,from support to development, with minor or major understanding of machine-spirit create new tools of commands.

With the advance of UNIX and morphication of systems to Linux, so did the shell with help of Brian Fox who pushed 100% free software alternative for the Bourne shell. Its moniker is a play on words, referencing both its predecessor, the Bourne shell, and the concept of rebirth.

Since its inception, Bash has gained widespread adoption and is commonly used as the default login shell for many Linux distributions. It holds historical significance as one of the earliest programs ported to Linux by Linus Torvalds, alongside the GNU Compiler GCC. Bash is now available on nearly all modern operating systems, making it a versatile tool across various computing environments.

What's the point of a history lesson ?

Whenever we develop something - whether it's a piece of software, a utility, or even a long list of logical commands - we find ourselves interfacing with the machine-spirit or Kernel which handles the requests we make, enabling us to work faster while the machine does the slow work. (Indeed, it may sound paradoxical, but think about it.)

This leads me to suggest that anyone who performs the blessed work of the Omnissiah -that is, scripting or programming - should at least use the shell or Bash to create smart automation.

How should one do it ?

In the vast corridors of my labyrinth, you may find several articles on shell/bash script based on POSIX and Bash standards. These resources can enhance your ability to produce tools and utilities for your own projects, as well as for the communities and teams you work with.

The bullet points on the matter are as follows:

  • Use dynamic headers to detect the correct running environment.
  • Create strict configurations for your script to avoid failure due to caveats.
  • Fail fast to identify bugs and errors.
  • Use functional programming (write a lot of functions) to boost productivity.
  • Break your script into smaller scripts for better version control.
  • Always test new features before sharing them with others.

Other magi like Arnold Robbins and Chris F.A. Johnson provide valuable knowledge based on my personal experience. Of course, other online resources offer insights as well, and you can explore them in your preferred format.

While writing these lines, a magus named Gabor Szabo released his article on the matter

Conclusion

Thank you, dear reader, for sharing your attention with my binary code generation.

Shell scripts and programs are essential to your project enhancements and automation, so use them with all hands on deck

If you liked what you read, please like and comment with suggestions, so I too can upgrade myself into a better cogitator.

Top comments (0)