Session Prices

Feel free to negotiate depending on your situation.

Scheduling

Hit me up to work out a scheduled time and date.
[email protected]
213-995-7078 text or voice
What Is Bash?

Bash is a programming language, just like any other. When you open up your terminal, you get a Bash REPL (read–eval–print loop). Most languages come with REPLs, such as Python, PHP, and Javascript. For example if you type node on your command line, you'll get the Node REPL and you can start executing Javascript functions and commands.

node
Welcome to Node.js v12.20.1.
Type ".help" for more information.
> (Javascript commands can be typed here now)

Type .exit to exit the Javascript REPL.

In a Bash terminal, you can type exit to exit a Bash REPL.

The power of Bash is that it comes built into most computers, is standardized amongst them, and has access to all the software on your system. Most software on your system is accessible to Bash directly with inputs and outputs being called Standard Input and Standard Output.

What does this mean? Input and output in Bash is standardized in a format that allows any software to get input or send output. This input and output is built into anything that wants to use it.

Sending input to a command or receiving output from a command is called piping. Piping, as in, you hook up a pipe from one command to another and all the data from one command flows into another. You pipe data from here to there.

What's an example of piping?

cat employees.sql | grep "Database"
-- Host: localhost    Database: employees
-- Current Database: `employees`

What's happening here? first cat employees.sql is being executed. This command dumps a file to Standard Output. Then we use a pipe | to send that output as Standard Input into grep "Database". Basically, the output of cat gets piped | into grep.

This is a powerful construct that allows us to process data using existing commands and can be utilized in our Bash scripts. You can pipe as many commands together as you need.

What is a Bash script? A Bash script is just a text file with bash commands in them. Any command you can execute on the Bash Command Line or REPL, you can put into a Bash script and execute.

In the next lesson, we'll create our first Bash script.