Bash Is Pretty Cool

Updated

Bash is a command-line interpreter and scripting language used to interact with your operating system. It reads the commands you type, expands and interprets their syntax, and then runs built-ins or launches other programs. Those programs use the operating system's system calls to ask the kernel to do things.

Here's a few things you can do:

1. Create aliases

Instead of typing out a long cd command to a deep file path, you can set an alias in your ~/.bashrc file.

alias cdb4d='cd ~/code/Backend4Dummies'

2. Write functions!

I got sick and tired of going through the entire Git add, commit, push sequence to make a tiny commit on one file, so I wrote a Bash function that simply automates that process for me.

Just be careful with functions that stage or push automatically: it is still worth checking git status so you know exactly what will leave your machine.