Bash in 100 Seconds

preview_player
Показать описание
Bash is the command line shell that you encounter when you open the terminal on most Unix operating systems, like MacOS and Linux. Learn how to create your own bash scripts to automate tasks on your computer.

#linux #compsci #100SecondsOfCode

🔗 Resources

🔥 Watch more with Fireship PRO

Use code lORhwXd2 for 25% off your first payment.

🎨 My Editor Settings

- Atom One Dark
- vscode-icons
- Fira Code Font

📖 Topics Covered

- Bash Programming Tutorial
- Linux Command Line Basics
- Bash Scripting
- History of Unix Shells
- Learn to Code with Bash
Рекомендации по теме
Комментарии
Автор

It's called a SHELL as it hides the kernel

Wow I never thought of it like that :))

_sudipidus_
Автор

fireship is turning us into 10X developers without us even knowing it

azatecas
Автор

So, the main take-away from this video is that the operating system is a squishy snail inside a shell?

Lukyan
Автор

"Rust in 100 seconds" would be cool

iyxan
Автор

These 100-second videos are so underrated, no one else fully outlines a concept this well. I can see if it's worth learning before I invest my time. 🔥

alexreade
Автор

add `set -e` at beginning to exit script if any command fails, `set -x` for printing commands that are being executed
very help full while developing script.

window.location
Автор

Bash literally taught me the true power of programming beyond console and libraries.
Like it's the most useful language in automation, when you're just starting.

thatsalot
Автор

Fun fact: You can use $0 instead of $SHELL to get the actual name of the current shell, not just the path

nastygamer
Автор

That "bourne" -> "born again" evolution taught me how old the tradition of nerdy play on words is for programmers, even very important programmers.
My favourite one is "Nero Burning ROM", it's just so perfectly layered.

cicalinarrot
Автор

After 5 years of avoiding bash scripts, I was literally at the crossroads to learn it for some specific task. I wake up to find this video in my feed. This guy is a mindreader.

maniksingh
Автор

Some thoughts:

EDIT: Please stop telling me about `#!/bin/sh`. This video is specifically about bash and so is this comment. I am aware that posix sh... exists. If you want to write POSIX compliant scripts, use sh. If you want to write modern scripts, use BASH. Also: even if you use sh instead of bash, you may still be writing bash. The best way to test for that would be shellcheck.
Oh and `/bin/sh` is not specified ny posix either, so you'll probably still want to use `#!/usr/bin/env sh`.

- Please do not use `#!/bin/bash` or `#!/usr/bin/bash` as your shebeng. Instead use `#!/usr/bin/env bash`. This way, bash can be installed pretty much anywhere and it will still work.
- Please always put double qoutes around variables unless you specifically need them unqouted (which you do when loop over an array using a for-loop for example). This will prevent unintended splitting of strings. Note that in bash single qoutes ('), double qoutes (") and backticks (`) all have a different meaning. Speaking of backticks:
- Whenever you see a stackoverflow answer around processing a command's output, you will probably see someone using a command enclosed by backticks. This is deprecated and should not be used. Instead, you can use $(command). However, you should also double qoute that, so "$(command)".
- Variables don't have to be all-caps. However, if you use them like " $VARsomething" where only VAR is the variable name, you may need to use curly brackets to signal bash where the variable starts and ends: "${VAR}something". Those can also be used for substitutions, which I recommend you just look up ;).

SkyyySi
Автор

That was fast. Now to learn all the branching, variables, pattern matching and syntax intricacies it will take only a 100 weeks. Full-time.

Gregorius
Автор

Would love a longer bash tutorial as it's syntax can get pretty rough, especially with flags inside if statements which is something unique to bash

Metruzanca
Автор

3 hours of uni classes in 100 seconds. I wish I would have found your channel back in 2019 when I started my CS degree

SebWayYT
Автор

Literally never wrote shell script and then it happened that I needed to put some code in background processing to the OS and started practicing how to write shell script. Once I got a hang of it, never went back from there. One of the most amazing ways to automate terminal commands and especially more useful to listen directly from your app.

gregor
Автор

Bash is possibly the most beautiful and manifoldly useful thing in computer science.

fiandrhi
Автор

I really love the animations of the topic logos in the beginning and end of the video. Nice details Jeff!

dankoller
Автор

wow I have been using bash for many years but this 100 seconds brought me so much new information I didn't know before, great job

mehdianisbrahmi
Автор

Learning to make simple scripts with Bash makes using Linux way better imo. It allows to automate tasks without installing anything. It's not fully portable but, for what it's meant to do, it's great!

rafaelpernil
Автор

Myself in college: Gosh, this Bash stuff is annoying to use. Good thing I just write Java for windows applications!
Job: Hey, so we want you to code up some linux containers to deploy our Java application inside. You happen to know shell scripting?

basicnpcc