Bash in 100 Seconds

Поділитися
Вставка
  • Опубліковано 23 лип 2024
  • 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
    Bash Reference www.gnu.org/software/bash/man...
    Unix Shell History developer.ibm.com/tutorials/l...
    Linux File System Explained • Linux Directories Expl...
    🔥 Watch more with Fireship PRO
    Upgrade to Fireship PRO at fireship.io/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
  • Наука та технологія

КОМЕНТАРІ • 1 тис.

  • @_sudipidus_
    @_sudipidus_ 2 роки тому +3493

    It's called a SHELL as it hides the kernel
    Wow I never thought of it like that :))

    • @Subuzgreatest
      @Subuzgreatest 2 роки тому +89

      Wonders of the English language.

    • @BarraIhsan
      @BarraIhsan 2 роки тому +18

      same lmao

    • @farhanaditya2647
      @farhanaditya2647 2 роки тому +12

      Wow, thanks man. I never thought about it that way!

    • @Joe3D
      @Joe3D 2 роки тому +25

      In macOS is no longer bash, but zsh.

    • @magicmulder
      @magicmulder 2 роки тому +51

      Me neither. It’s like the German word for glove is literally “handshoe” but I never think of shoes when using it.

  • @azatecas
    @azatecas 2 роки тому +2773

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

    • @Winnetou17
      @Winnetou17 2 роки тому +63

      It's ok, we'll just spend 90% of our time watching programming videos on UA-cam, and no one will know then :D

    • @gfjffdgjroedsfdkdslmerrelb4357
      @gfjffdgjroedsfdkdslmerrelb4357 Рік тому +2

      i am looking for partner who want to learn bash through co opearation

    • @BrandonCastillo-eo1or
      @BrandonCastillo-eo1or Рік тому

      @@gfjffdgjroedsfdkdslmerrelb4357 How does this arrange works ? 🤔

    • @bp6480
      @bp6480 Рік тому

      @@gfjffdgjroedsfdkdslmerrelb4357 it's called a book

    • @mmmar7317
      @mmmar7317 Рік тому

      I am currently -10x dev

  • @Lukyan
    @Lukyan 2 роки тому +1018

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

    • @____-gy5mq
      @____-gy5mq 2 роки тому +29

      "bash the snail, crash the trail"

    • @Flocksta
      @Flocksta 2 роки тому +1

      Os is different type of shell i think

    • @LupusMichaelis
      @LupusMichaelis 2 роки тому +1

      @@saulgoodman5662 No. And i won't dare to define what's actually an OS, as too many opinionated definition are out there in the wild fighting for nothing.
      A single binary, that's a first ^^ Even the monolithic Linux kernel isn't a single file.

    • @GerhardusScheltema
      @GerhardusScheltema 2 роки тому +9

      I always though the shell protects the squishy human from the awesome power of the kernel, allowing you to weild the awesome power of Linux without getting hurt by grabbing the sword at the wrong end.

    • @martindjakovic7052
      @martindjakovic7052 2 роки тому +2

      If it’s windows, then yes.

  • @alexreade9229
    @alexreade9229 2 роки тому +371

    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. 🔥

    • @dixztube
      @dixztube 2 роки тому +1

      So true. It got me into go and helped me with graphql back in the day.

    • @gfjffdgjroedsfdkdslmerrelb4357
      @gfjffdgjroedsfdkdslmerrelb4357 Рік тому

      i am looking for partner who want to learn bash through co opearation

    • @heywrandom8924
      @heywrandom8924 5 місяців тому

      There is also the learn x in y minutes website for quickly learning syntax of programming languages

  • @iyxan2340
    @iyxan2340 2 роки тому +3299

    "Rust in 100 seconds" would be cool

    • @janism94
      @janism94 2 роки тому +53

      and WASM

    • @Justin73791
      @Justin73791 2 роки тому +38

      @@janism94 He did WASM, at least 100 seconds of it and he said he plans to do a longer video soon.

    • @balu.92
      @balu.92 2 роки тому +21

      I've heard Rust is complicated. Curious to see how Fireship would do it.

    • @tobiasdebruijn5240
      @tobiasdebruijn5240 2 роки тому +30

      @@balu.92 it's not too bad honestly. I'd say the hardest is learning the borrow system and to work with the borrow checker

    • @SamualN
      @SamualN 2 роки тому +8

      then zig

  • @SkyyySi
    @SkyyySi 2 роки тому +506

    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 ;).

    • @AlejandroLZuvic
      @AlejandroLZuvic 2 роки тому +8

      Great comment. Thanks!

    • @____-gy5mq
      @____-gy5mq 2 роки тому +9

      even better, use `#!/usr/bin/env -S bash` which can be generalized for any shell and any number of arguments before the script file.

    • @Gregorius421
      @Gregorius421 2 роки тому +1

      Ah, substitutions are my wake-up coffee. Great advices.

    • @slavko5666
      @slavko5666 2 роки тому +6

      "#!/usr/bin/env" isn't standard on all systems though. For some reason there is no standard for shebengs.

    • @tanmay______
      @tanmay______ 2 роки тому +10

      Bad idea, #!/usr/bin/env bash isn’t POSIX compliant and breaks compatibility on non-BASH systems. It’s better to use #!/bin/sh which is a symlink to the shell that is installed on the system.

  • @thatsalot3577
    @thatsalot3577 2 роки тому +52

    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.

  • @window.location
    @window.location 2 роки тому +258

    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.

    • @childfs6865
      @childfs6865 2 роки тому +4

      I had no idea. Thank you very much!

    • @Pokefreak554
      @Pokefreak554 2 роки тому +9

      You can also execute your script with bash -x file.sh instead of commenting and uncommenting your set -x while debugging :)

    • @starpawsy
      @starpawsy 2 роки тому +1

      can also use "set -v" fort verbose which simple echose the commands before executing them.

    • @SeanSMST
      @SeanSMST Рік тому

      Thank you. Been learning to write bash scripts while doing my first today.

    • @SeanSMST
      @SeanSMST Рік тому

      @@Pokefreak554 It's much easier to give x permission with chmod permanently than type bash -x each execution

  • @cicalinarrot
    @cicalinarrot Рік тому +27

    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.

    • @TheOO23
      @TheOO23 6 місяців тому

      I like : gezerolee (french pun) and git !

  • @maniksingh92
    @maniksingh92 2 роки тому +80

    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.

    • @alii4334
      @alii4334 2 роки тому +9

      UA-cam is the mind reader!

    • @mohos_a
      @mohos_a 2 роки тому +22

      No you're data is just being collected. Try some blockers

    • @MaeLSTRoM1997
      @MaeLSTRoM1997 11 місяців тому

      @@mohos_a lol my thoughts exactly. google probably looked at his search history

  • @nastygamer7929
    @nastygamer7929 2 роки тому +1244

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

    • @maxrisku765
      @maxrisku765 2 роки тому +12

      not working for me 🤷

    • @nastygamer7929
      @nastygamer7929 2 роки тому +9

      @@maxrisku765 Really? What's the output of "echo $0"

    • @alois6909
      @alois6909 2 роки тому +71

      That's because a bash program has it's process name located at $0 variable. Bash itself is a program running a "bash" process.

    • @africayean1311
      @africayean1311 2 роки тому +24

      @@maxrisku765 it doesn't work on ur pretty cmd

    • @icarofilho6524
      @icarofilho6524 2 роки тому +3

      doesnt work on Ubuntu

  • @Metruzanca
    @Metruzanca 2 роки тому +449

    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

    • @minnow1337
      @minnow1337 2 роки тому +18

      Yea I was a little disappointed with the scope of this vid but at least it serves as an introduction to the technology for beginners

    • @seerlite5256
      @seerlite5256 2 роки тому +2

      What do you mean with "flags inside if statements"?

    • @manbillions8326
      @manbillions8326 2 роки тому

      It's an scripting language, it's not complicated

    • @Metruzanca
      @Metruzanca 2 роки тому +6

      @@seerlite5256 I mean literally flags... inside if statements. Just as you would on the command line pass git commit the "-m" flag, in bash you can do stuff like if [[ -d dirName ]] which checks if dirName exists. Other flags I know of are -z & -n but theres probably more. (also if the double [[ ]] threw you for a loop, thats another odity of bash)

    • @seerlite5256
      @seerlite5256 2 роки тому +13

      @@Metruzanca Oh so you mean flags for the `test` command. An if statement just runs a command and executes the blocks depeding on the return code:
      if mkdir dir; then echo "dir created"; else echo "dir exists"; fi
      It's the `test` command (AKA [, or the more sophisticated [[ in bash and zsh) that have different flags for what you're testing.
      You can actually use `test` without any if statement. Very useful for one-liners:
      [[ -f file.txt ]] && echo "File exists"

  • @Gregorius421
    @Gregorius421 2 роки тому +248

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

    • @alexradu1921
      @alexradu1921 2 роки тому +4

      Hello, what can I do with this Bash knowledge after? Can I be a sysadmin?

    • @ehsanahmed5550
      @ehsanahmed5550 2 роки тому +1

      @@alexradu1921 check out his videos for that: ua-cam.com/channels/vA_wgsX6eFAOXI8Rbg_WiQ.html

    • @Gregorius421
      @Gregorius421 2 роки тому +23

      @@alexradu1921 This knowledge is enough to start getting familiar with Linux/Unix systems, to learn how to start, stop and configure programs and services and how to read and write the shell scripts that manage your system. These scripts coordinate the system, starting from boot (system init).
      It will take a few months of learning to become a sysadmin and years to master it.

    • @aufkeinsten7883
      @aufkeinsten7883 2 роки тому +5

      @@alexradu1921 It's an important tool that you should be somewhat familiar with, but there's more to being a sysadmin than this (I'm a regular dev, so I might be missing stuff, but networking, hardware, IT-security quickly come to mind)

    • @MoonV29
      @MoonV29 Рік тому +2

      @@Gregorius421 I was like wth is bash because i had already been working in a linux/unix environment. Turns out i skipped quite a number of steps xD

  • @shravanasati9631
    @shravanasati9631 2 роки тому +381

    Golang in 100 seconds.

    • @arkrait04
      @arkrait04 2 роки тому +11

      Golang is marketing bullshit and an awful language made just so that graduates could copypaste CRUDs. The only good thing it has is a performant runtime.

    • @albertbennett6290
      @albertbennett6290 2 роки тому +3

      @@arkrait04 I will admit that it got worse after they introduced the module system

    • @aArcziMetin2
      @aArcziMetin2 2 роки тому

      Mission Impossible

    • @balu.92
      @balu.92 2 роки тому +2

      @@arkrait04 which language do you prefer for backend?

    • @saadisave
      @saadisave 2 роки тому +5

      @@balu.92 Rust all the way. Go has a simple syntax, but you have to reinvent the wheel too often.

  • @SebWayYT
    @SebWayYT 2 роки тому +45

    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

    • @khandmo
      @khandmo Рік тому +4

      No shot that was 3 hours of uni you should’ve went to a different school

    • @HenryTitor
      @HenryTitor Рік тому

      @@khandmoIt kind of is, most system programming introductory course will have a chapter for SHELL and terminal. It usually finish in 2-4 classes, which is about 3 hours

    • @cnmy97727
      @cnmy97727 Рік тому

      Ruduty de s

  • @mehdianisbrahmi9262
    @mehdianisbrahmi9262 2 роки тому +3

    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

  • @dankoller246
    @dankoller246 2 роки тому +7

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

  • @gregor3148
    @gregor3148 2 роки тому +49

    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.

    • @-morrow
      @-morrow 2 роки тому +5

      I just hate the quirkiness and the different standards (POSIX, BASH, ZSH, etc).

    • @xrafter
      @xrafter Рік тому +1

      ​@@-morrow
      The only standard from those three is POSIX. Bash and zsh are shells.
      Also, why are you hating it, bash has --posix flag for that.

    • @donaldteed35
      @donaldteed35 6 місяців тому +1

      @@-morrow Then try MS Powershell - a standard that changes every year and requires modules to be loaded before many documented commands will work (and they'll never have a nice error like "blah blah not found"). I have bash scripts written over a decade ago that will work. The other weird part of PS is the | character sometimes behaves like a flag (|FL for full) and sometimes behaves like Linux pipe. PS is really non-intuitive and verbose and hinders everything you try to do (like defaulting to showing only the first few hundred results).

  • @tt-fx6nt
    @tt-fx6nt 2 роки тому +2

    Wow, best 100 seconds about bash. Please do more series like this, bash 100 seconds part 1, part 2 and so on in all 100 seconds video. Short, but very informative. Keep up the good job

  • @ArivanAshstar
    @ArivanAshstar 2 роки тому +2

    Another amazing 100 seconds.
    Gives all the info u need quick and without padding or harsh opinions.
    Need to hear something again, just pause and go back :D

  • @fiandrhi
    @fiandrhi 2 роки тому +4

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

  • @rafaelpernil
    @rafaelpernil 2 роки тому +5

    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!

  • @Imdeepakmp
    @Imdeepakmp 4 місяці тому

    Always a fan of short and straight to the point vids of Fireship

  • @JustSomeRandomIdiot
    @JustSomeRandomIdiot 2 роки тому

    Perfect, that was everything I needed to know about bash to know whether or not it's worth investing any more time into learning it.

  • @TheJamesconroy
    @TheJamesconroy 2 роки тому +86

    Hey variable names don't need to be all uppercase. By convention most variables set up by OS or programs are uppercase so it's usually a good idea not to make your variables uppercase. Doing that will prevent you from using and overwriting default's by accident.

    • @ForeverZer0
      @ForeverZer0 11 місяців тому +3

      I have some personal conventions that I follow: Any variable that is exported and intended to be read elsewhere is all caps, and usually "configuration" variables at the top of a script. I do use lowercase for "local" variables that are used only within the script itself.

  • @basicnpcc
    @basicnpcc 2 роки тому +180

    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?

    • @BharadwajGiridhar
      @BharadwajGiridhar 2 роки тому

      So true

    • @magicmulder
      @magicmulder 2 роки тому

      Well I did try to use bash exclusively for my private projects but gave up once I needed YAML.

    • @magicmulder
      @magicmulder 2 роки тому

      @Andai Because it's too clumsy, even with tools like yq. Especially once you start nesting several levels deep.

    • @TaskForce-wb7nq
      @TaskForce-wb7nq Рік тому

      yeah most companies will want you to know how to use linux and shell, is important but one of the most boring things i have ever learned in life

  • @vdynmx
    @vdynmx 2 роки тому +1

    Holy. I never knew how much I needed to see this video. thank you

  • @mavlonodev
    @mavlonodev 10 місяців тому +2

    Fireship is literally turning the topics that I am scared of thinking It's too hard to easy labeled ones. Thanks Fireship!

  • @palexer2505
    @palexer2505 2 роки тому +6

    Golang/Rust in 100 Seconds would be great! And also: great video, as always.

  • @RhemaxosLord
    @RhemaxosLord 2 роки тому +32

    Any chance we get a golang in 100 seconds video?

  • @MichaelMilord
    @MichaelMilord 2 роки тому +1

    you make it look so easy to write bash scripts lol. Love your content man, keep it up!

  • @turkym7md5
    @turkym7md5 2 роки тому +1

    your last tip about ending the command with & to run it in anothet thread saved me A TON! thanks a lot 🙏

    • @xrafter
      @xrafter 2 роки тому +1

      You could see the result of command by running "jobs" .

  • @creeperkafasi
    @creeperkafasi 2 роки тому +5

    Windows Users: **Confused screaming**

  • @JAVAxNANI
    @JAVAxNANI 2 роки тому +8

    Love you fireship ❤️❤️

  • @jamesbank833
    @jamesbank833 2 роки тому

    I just started learning bash a few weeks ago, this is a great intro!

  • @JohnVance
    @JohnVance 2 роки тому +1

    This was really good, subscribed!

  • @aquilazyy1125
    @aquilazyy1125 Рік тому +14

    Fun fact, the “[“ symbol isn’t really part of the syntax but an alias of the “test” program. Both of which does exactly the same thing except that “[“ also checks for a closing “]”, which also isn’t part of the syntax but rather a parameter sent to the “[“ program.

    • @leoniduvarov5236
      @leoniduvarov5236 6 місяців тому +1

      and that probably explains why you need a space after '['

  • @PredaBoon
    @PredaBoon 2 роки тому +6

    Regarding the background command, make sure to put nohup either in the line itself or when running the script to make sure the process is not killed upon session closing. (usually the most affected is SSH logins since every shell is a seperate session.)

    • @Paulo27
      @Paulo27 Рік тому +1

      nohup command & disown
      😎 (disown prevents you from CTRL-Cing the command)

  • @droidy347
    @droidy347 Рік тому +2

    Bash is definitely the most useful thing ever created 🙏

  • @fanaFSF
    @fanaFSF 2 роки тому

    love your 100 seconds videos. Thank you

  • @mallikarjunaswamyn483
    @mallikarjunaswamyn483 2 роки тому +6

    Fireship's 2 min videos are more like video cheatsheets. So cool 👌👍

  • @michaelpoirier22
    @michaelpoirier22 2 роки тому +24

    I'd love to see a 100s video on a reasonably complex design pattern, like decorator or visitor

    • @arisweedler4703
      @arisweedler4703 2 роки тому

      I can't imagine explaining the visitor pattern in 100 seconds!! But I believe that someone who understands it better certainly could, and quote easily.

    • @gfjffdgjroedsfdkdslmerrelb4357
      @gfjffdgjroedsfdkdslmerrelb4357 Рік тому

      i am looking for partner who want to learn bash through co opearation

  • @anirbanc88
    @anirbanc88 2 роки тому

    i love your editor settings !

  • @dripdrops3310
    @dripdrops3310 2 роки тому

    This 2 minute video was enough to get me started righting some scripts.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 2 роки тому +10

    0:17 Command-line interpreters (CLIs) were not a revolutionary concept in 1971. After all, every interactive OS had them, and there were quite a few by that time. What was revolutionary was the idea that the CLI ran as just another ordinary process with no special privileges, rather than being built into the OS.

    • @starpawsy
      @starpawsy 2 роки тому

      Correct. But there were other revolutionany things about the concept. One of them was that it could be replaced by other products if you so wished.

    • @JustinK0
      @JustinK0 Рік тому

      command-line interface

    • @shellyreneegracia4030
      @shellyreneegracia4030 9 місяців тому

      Secxy

  • @ananttiwari1337
    @ananttiwari1337 2 роки тому +13

    awesome video. more in depth version soon?

  • @linixo7485
    @linixo7485 Місяць тому

    Learned more than in a 3 Hour Tutorial! Keep it up!

  • @rezamostafid8810
    @rezamostafid8810 2 роки тому

    Aaaawesome....you pointed out all the salient features in 100 secs. Someone watching carefully could start writing a script. Of course that would be the start of the learning curve.

  • @PrasangaBasnayake
    @PrasangaBasnayake 2 роки тому +34

    Wow that brought back memories of cs class. Aah the good old days 🤗 still thinking Id be able to make my own Linux distribution.

  • @ark5458
    @ark5458 2 роки тому +13

    next video: quick overview of simple commandline apps like
    grep, cat, echo, sed, curl, awk, -ed-

    • @xrafter
      @xrafter 2 роки тому

      Awk is a hole scripting language it isn't simple

  • @Koyi_supremacist
    @Koyi_supremacist 2 роки тому +1

    Bestest coding playlist, keep going men👍

  • @ThePowerRanger
    @ThePowerRanger 2 роки тому

    The intro animation was fire!!🔥

  • @ranaakhil
    @ranaakhil 2 роки тому +14

    JAM Stack in 100 sec.

  • @creeper283
    @creeper283 2 роки тому +3

    Haskell in 100 seconds.
    Good luck, you're gonna need it!

  • @damssiart9411
    @damssiart9411 7 місяців тому

    Daaaaaaaamn!! the music used in the background made me eager to learn every single command in bash

  • @cbnewham535
    @cbnewham535 Рік тому

    I wrote the O'Reilly book on Bash. It's nice to see such a nice concise video about Bash.

  • @jjlegend8819
    @jjlegend8819 2 роки тому +26

    C++ in 100s. I think it deserves one given how much of the underlying web infrastructure is built with it.

  • @seerlite5256
    @seerlite5256 2 роки тому +110

    Great video! Note however that by convention variables shouldn't be all caps unless they're environment variables.

    • @stephan6530
      @stephan6530 2 роки тому +6

      Or constants

    • @WilliamAndrea
      @WilliamAndrea 2 роки тому +5

      Or special variables like $RANDOM

    • @vanarpilipap302
      @vanarpilipap302 2 роки тому

      would you elaborate on what environment variables are briefly?

    • @seerlite5256
      @seerlite5256 2 роки тому +3

      @@vanarpilipap302 Environment variables are variables that are shared to child processes. For example let's say I start a bash shell, set HELLO=1 and then I open python from the Bash shell. If it's a regular variable, Python won't know anything about it. However, if I mark it as an environment variable, Python will be able to access it via its API (os.environ). This is useful to pass settings to programs across many subprocesses. Some operating systems also let you configure "global" environment variables so that all shells start with those values by default.

    • @framegrace1
      @framegrace1 Рік тому +4

      That's not the whole picture.... POSIX forces to any variable that needs to be exported has to be upper case or "_" . That includes what you call "environment variables" which really are bash RESERVED variables.
      Most old school shell programers like me always use uppercase because on those days, there was no syntax coloring, and in bash is really easy to mix commands, scripts and variables if all of them are lowercase.
      For those two reasons, you will see uppercase variables in bash scripts everywhere even from very respected sources.

  • @akosfejes5289
    @akosfejes5289 2 роки тому

    Wow. Just needed this. Thanks!

  • @BrunoJuliao7
    @BrunoJuliao7 2 роки тому +1

    Amazing video. Thank you 😇

  • @lorensims4846
    @lorensims4846 2 роки тому +6

    A couple of years ago macOS changed the default shell to zsh.
    Before Mac OS X 10.3 Panther the default shell was tcsh.
    Of course you can always change your shell by typing its name.

    • @VincentJenks
      @VincentJenks 4 місяці тому

      Right. Or, just execute the script with bash by prefixing with “bash” in the terminal.

  • @rudrapratapsinha8880
    @rudrapratapsinha8880 2 роки тому +8

    Fireship posts video. I click.

  • @criptovida
    @criptovida 2 роки тому

    An interesting source for learning good content in a short time. Thanks for sharing.

  • @Pedram-cy3wu
    @Pedram-cy3wu 10 місяців тому +1

    I think & at the end of command just returns shell to you for entering new command and won't send execution to the background. For putting execution at background, we can use supervisorctl or "nohup &"

  • @YOUdudex
    @YOUdudex 2 роки тому +5

    Bash shell is love ❤️

  • @lunkums
    @lunkums 2 роки тому +4

    incredibly easy to learn but takes a long time to master

  • @hafizullahqasemi7332
    @hafizullahqasemi7332 2 роки тому +1

    great content as always

  • @bendevdixon
    @bendevdixon 2 роки тому

    I needed this.

  • @randomrobin6104
    @randomrobin6104 2 роки тому +3

    Great video as usual !
    Kafka and MQ in general in 100s would be great 😁

  • @maheshkumartangella5516
    @maheshkumartangella5516 2 роки тому +15

    I see the notification for fireship new video, I click. Simple as that

  • @amphibia95
    @amphibia95 2 роки тому

    Awesome summary!

  • @ethanoppenheim2884
    @ethanoppenheim2884 Рік тому

    Answered all my questions in 100 seconds. Thanks

  • @gustavoviana5508
    @gustavoviana5508 2 роки тому +27

    "Lua in 100 seconds" would be nice. Both Awesome wm (one of the most used tiling window managers) and Neovim (the best text editor of course) are both written in lua.

    • @skylinefx049
      @skylinefx049 2 роки тому +3

      Lua and Neovim are trash

    • @007arek
      @007arek 2 роки тому +1

      I've learnt Lua recently and it's such a fun to use language. I don't know why nobody uses it for scripting instead of bash.

    • @gustavoviana5508
      @gustavoviana5508 2 роки тому +8

      @@skylinefx049 w
      w
      w
      w
      w
      w
      w
      who asked you

    • @manbillions8326
      @manbillions8326 2 роки тому +1

      @@007arek Because it's not zero indexed

    • @007arek
      @007arek 2 роки тому

      @@manbillions8326 In Lua it makes sense with associative arrays. AWK does something similar, white spaces are stored in 0 index.

  • @mirashif
    @mirashif 2 роки тому +3

    Bash beyond 100 seconds.

  • @arslancodecorner
    @arslancodecorner 2 роки тому +2

    This dude is God Gift for Developers😍

  • @ehsanset6709
    @ehsanset6709 2 роки тому

    Loved the video, thanks

  • @Eyad_faramawy
    @Eyad_faramawy Рік тому +3

    The person who watches your videos must know everything about computer😢

  • @DenisDuvauchelledev
    @DenisDuvauchelledev 2 роки тому +3

    I like it when you do “something in 100s” but then go longer after to go more into details.

  • @ezrakeeps
    @ezrakeeps 2 роки тому +1

    Educational and fun
    Thank you for this

  • @anouarali40
    @anouarali40 2 роки тому

    Love the concept

  • @RawPeds
    @RawPeds 2 роки тому +4

    One of the best things about bash is that it's immediately available on Linux. No matter what one installs on the top of the operative system, the bash is there.

    • @xrafter
      @xrafter 2 роки тому +1

      Except it is a minimal install then only sh is available .

    • @zoltanposfai3451
      @zoltanposfai3451 2 роки тому

      @@xrafter Or an embedded system.

  • @IAmLesleh
    @IAmLesleh 2 роки тому +3

    The default shell on macOS is now zsh. It switched away from Bash when Bash switched its license to GPL v3.

  • @asafnisan
    @asafnisan Рік тому

    This was amazing. Thanks. Love and respect from Istanbul.

  • @niksatan
    @niksatan 2 роки тому

    dude thanks, this video helped me a lot, 100s is more than enough!

  • @antonioquintero-felizzola5334
    @antonioquintero-felizzola5334 2 роки тому +3

    Quick correction, Linux is NOT based on Unix. It's a Unix-like operating systems based on the Linux kernel.

  • @adamsavard535
    @adamsavard535 2 роки тому +3

    Waiting for The Friendly Interactive Shell (FISH) in 100 seconds now

    • @Zephyrus0
      @Zephyrus0 2 роки тому

      Not POSIX

    • @adamsavard535
      @adamsavard535 2 роки тому

      @@Zephyrus0 for a personal machine, I truly don't care about POSIX compliance.

    • @Zephyrus0
      @Zephyrus0 2 роки тому

      Makes sense, but you would need a POSIX shell if you are using someone's scripts or vice versa

  • @exmax8781
    @exmax8781 2 роки тому

    MAN, how the heck did you explain it that well in so little time? You're a fucking machine of great content

  • @hyrummoses5819
    @hyrummoses5819 2 роки тому

    I learned more about bash in this short video than in the first 4 lectures my professor gave.

  • @armchair_expert
    @armchair_expert 2 роки тому +5

    I have been developing software for over a decade and I still hate bash. It would be awesomeness if you wanted to do a longer bash video, that deals with all the counter intuitive intricasies in a way that you can almost make sense of it. Just praying 😃

  • @DerChrilleAusBln
    @DerChrilleAusBln 2 роки тому +3

    The default shell on macOS is now zsh not bash anymore

    • @ananttiwari1337
      @ananttiwari1337 2 роки тому +4

      He addresses that in the video, he mentions "pre-catalina" in the graphic

    • @Fireship
      @Fireship  2 роки тому +3

      That's why noted it with "pre-catalina".

    • @DerChrilleAusBln
      @DerChrilleAusBln 2 роки тому +1

      Ah my bad sorry

    • @AlejandroLZuvic
      @AlejandroLZuvic 2 роки тому

      @@Fireship I have a question: if the shebang correctly references Bash wouldn’t the terminal invoke Bash to run the script? I know ZSH is the default shell but Bash is included along ZSH as well.
      Also, it’d be great to have a “ZSH in 100 seconds” to know the biggest differences and/or a “beyond 100 seconds”. That’d be really awesome, I always wanted to jump on Bash scripting but it seems so daunting.
      Thanks for the hard work!

    • @ananttiwari1337
      @ananttiwari1337 2 роки тому

      @@AlejandroLZuvic "I have a question: if the shebang correctly references Bash wouldn’t the terminal invoke Bash to run the script? I know ZSH is the default shell but Bash is included along ZSH as well." Yeah I'd assume so

  • @kwadoskii
    @kwadoskii 2 роки тому

    Learnt something new as always

  • @abhaythakur8572
    @abhaythakur8572 2 роки тому +1

    you should also create long videos as well, your content is the best

  • @Darkev77
    @Darkev77 2 роки тому +4

    "Command Prompt" in 100 seconds please

  • @fckngcheetah
    @fckngcheetah 2 роки тому +5

    Nuxt in 100 Seconds? :)

  • @BenedictGS
    @BenedictGS 2 роки тому +2

    Damn another banger video

  • @eichholzturtles
    @eichholzturtles Рік тому

    awesome tutorial!

  • @othman_
    @othman_ 2 роки тому +3

    Please explain data science, machine learning or AI in 100 Seconds

  • @bentownsend388
    @bentownsend388 2 роки тому +3

    I spend my life writing bash scripts. I get paid for it as well which is nice 😂

  • @andrepeixoto2947
    @andrepeixoto2947 8 місяців тому

    I like this 100-second video style better than the new ones. :)

  • @emil.mammadov
    @emil.mammadov 2 роки тому

    That was great!