Learn Bash Scripting with freeCodingCamp
Tags: bash, tutorial, freecodecamp
Published: 2022-04-30 18:08:55

---
title: Learn Bash Scripting with freeCodingCamp
published: true
cover_image: 'https://blog.eamonncottrell.com/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650647435998%2FmHX-pq6yL.jpg%3Fw%3D1600%26h%3D840%26fit%3Dcrop%26crop%3Dentropy%26auto%3Dcompress%2Cformat%26format%3Dwebp&w=3840&q=75'
date: 2022-04-22 17:16:04 UTC
tags: 'bash,tutorial,freecodecamp'
canonical_url: https://blog.eamonncottrell.com/learn-bash-scripting-with-freecodingcamp
---

## Cookies Beware

Here's what I'm currently being greeted with at the onset of this leg of the journey. It's an error I encountered in the last project too. When I click the start course button, it just freezes up on a blank screen when it should be prompting me to log in with CodeAlly.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1649950718078/GjoJogaJT.png)

**Do Not Despair**

[https://media.giphy.com/media/PjZpTIloQN5ILZKPKo/giphy.gif](https://media.giphy.com/media/PjZpTIloQN5ILZKPKo/giphy.gif)

If this happens to you, you can go straight to [CodeAlly](https://codeally.io/) and go to the playground there to load into the project.

Or...just go into Chrome's settings and enable third-party cookies. I had mine disabled for Incognito mode which was apparently enough to mess up the login process on the regular browsing mode too.

![cookies.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1650645706622/BuZOir4uP.png)

### Commands

Here are some of the commands used in the course

- `sh`: uses shell interpreter
- `bash`: bourne-again shell...uses the bash interpreter
- `ls -l`: list permissions of current directory's files
- `printenv`: prints out the environment variables
- `chmod +x <filename>`: adds executable permissions to the file
- `help <command>`: find out more about a command
- `man <command>`: displays the manual for a command if available

## The Programs

This course tried my patience. I encountered a lot of technical issues...okay, okay: user issues as well. There were a number of times where I would get one of the five programs to work properly, but because I had not typed it exactly as the tutorial expected, the tests wouldn't pass.

This is exactly how computers are supposed to behave, but this course more than the first two, felt like it was in beta. Just a hair rough around the edges.

That said, it was a fine intro to bash, and we created five working programs:

1. questionaire.sh: in which we prompt the user for input
2. countdown.sh: in which we create a timer that counts down every second until it gets to zero
3. bingo.sh: in which we create conditional statements and a random number to display results based on the random number
4. fortune.sh in which we create an array, ask the user for a question, check if the question ends in a '?' and then displays a randomly selected answer from the array.
5. five.sh: in which the program runs the previous four programs one after another

## Bash to Basics

Do these seem easy to you? They are if you have any kind of programming experience. But, the syntax of Bash is different from Javascript or Python. And there are built in functions unique to Bash that the course walks through.

On the whole, the two great things you'll get out of this are:

1. Overview of the command line language Bash
2. A lot more practice doing things from the command line

## Onward to More SQL! 📣

I'm ready to hop into the next courses which go back into PostgreSQL. Keep an eye on my blog here for updates as I continue through this [freeCodeCamp Relational Database Certification](https://www.freecodecamp.org/learn/relational-database/).

## Thanks! 👋

Thanks for reading. Come say hey over on [Twitter](https://twitter.com/EamonnCottrell), and let me know what you think in the comments below.

[https://media.giphy.com/media/icUEIrjnUuFCWDxFpU/giphy.gif](https://media.giphy.com/media/icUEIrjnUuFCWDxFpU/giphy.gif)