DEV Community

Cover image for BASHing through the terminal

BASHing through the terminal

Jose Ross Barredo on April 15, 2019

My fascination with Bash Shell Scripting started just 3 months ago. Prior to that, I never had any knowledge with what and how to bash. It has prov...
Collapse
 
ferricoxide profile image
Thomas H Jones II

Being heavily invested in shell scripting sometimes makes it hard to shift gears to other "real" languages. Haven't really found much, yet, that I can't accomplish more quickly in a shell script (due to the reflexive nature of same) ...And have also had a lot of people look at my shell code and remark, "I didn't know all of that could be done in shell scripting."

Collapse
 
iamjoross profile image
Jose Ross Barredo

Would you say then that shell scripting is a beneficial "language" to learn? I have read blog posts saying that learning to shell script is a waste of time.

Collapse
 
ferricoxide profile image
Thomas H Jones II

Depends on what you're doing. If you ever need to do OS-level tasks (rather than pure application-development), then it's foolish not to learn how to automate and optimize the execution of those tasks.

Collapse
 
radio_azureus profile image
Radio Azureus

I work in bash since the dawn of #Linux

Collapse
 
iamjoross profile image
Jose Ross Barredo

Wow! How often do you use bash and for what tasks?

Collapse
 
radio_azureus profile image
Radio Azureus

Reference link <dev.to/radio_azureus/comment/a5pb>

I use bash over the whole gamut, from simple tasks as managing files & directories in ~ to (simple) programming & scripting where it is just vital to have a shell you are comfortable in.

There are many flavors of shells, so you will also meet people who love #csh #ksh #zsh (had this on my Amiga) #ash #sh (the original Bourne shell)

Whatever OS I'm in, I install git, since it also has git bash in case you are on an OS which has no bash installed.

This is an example of how I use git to manage markdown files all via bash
<imgur.com/N3HDHMG>

I can easily move to another workstation and OS. Then I can pickup where I left off transparently as if nothing happened.

I could also sync my ~/.bash_history via my network, if needed instead of ssh-ing to the machine to peek into the file to lookup a complex ssh tunnel pipe I've forgotten the exact syntax to.

Since I also spawn all executable from the shell ever since the #c64 & #amiga computer era (Amiga CLI), I have a shell open whenever my workstation runs. In case of this #DAW it's 24/7

On servers and workstations I basically live in $bash

()#DAW -> digital audio workstation

Collapse
 
vishwakarma09 profile image
Sandeep Kumar

Like when working on nose project. Or when on working on python security modules like sqlmapper

Collapse
 
denisrasulev profile image
Denis Rasulev

Using bash for some basic staff, like moving around directories, scp-ing files to/from my VPSs, crontabing some basic regular operations, logs checking etc. Would love to upgrade my level of bash :)