Bash Scripting Tutorial for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 มิ.ย. 2024
  • Learn bash scripting in this crash course for beginners. Understanding how to use bash scripting will enhance your productivity by automating tasks, streamlining processes, and making your workflow more efficient.
    ✏️ Course created by ‪@Herbertech‬
    💻 Code: github.com/herbertech/bash-in...
    ⌨️ (00:00) Introduction
    ⌨️ (03:24) Basic commands
    ⌨️ (06:21) Writing your first bash script
    ⌨️ (11:29) Variables
    ⌨️ (14:55) Positional arguments
    ⌨️ (16:23) Output/Input redirection
    ⌨️ (23:23) Test operators
    ⌨️ (25:19) If/Elif/Else
    ⌨️ (28:37) Case statements
    ⌨️ (32:16) Arrays
    ⌨️ (34:12) For loop
    ⌨️ (36:03) Functions
    ⌨️ (41:31) Exit codes
    ⌨️ (42:30) AWK
    ⌨️ (45:11) SED
    🎉 Thanks to our Champion and Sponsor supporters:
    👾 Nattira Maneerat
    👾 Heather Wcislo
    👾 Serhiy Kalinets
    👾 Erdeniz Unvan
    👾 Justin Hual
    👾 Agustín Kussrow
    👾 Otis Morgan
    --
    Learn to code for free and get a developer job: www.freecodecamp.org
    Read hundreds of articles on programming: freecodecamp.org/news

ความคิดเห็น • 188

  • @Herbertech
    @Herbertech ปีที่แล้ว +137

    Thanks for the support, Beau. Happy/excited be on the FCC channel! 😀

    • @PureAwareness76
      @PureAwareness76 2 หลายเดือนก่อน +1

      ❤ Just found your Linux course on the other day - and now, you're here 🎉

  • @eperez_yt
    @eperez_yt ปีที่แล้ว +15

    This introductory course was very useful and I loved how visually is well structured. Actually, bash is so useful for any project. TY for this vid.

  • @ivyscripting7240
    @ivyscripting7240 ปีที่แล้ว +59

    I bought an entire course on Udemy to learn linux and bash scripting and this was so incredibly clear and straightforward in comparison. Really appreciate how easily Herbert broke down bash scripting and I hope you have more courses on the FCC channel.

    • @user-br9zx3ip3x
      @user-br9zx3ip3x 3 หลายเดือนก่อน

      here for the same reason

  • @quincylarsonmusic
    @quincylarsonmusic ปีที่แล้ว +8

    This is an excellent Bash primer. Thank you @Herbertech for creating this and for sharing this with the global developer community. 🙏

  • @Markus-iq4sm
    @Markus-iq4sm ปีที่แล้ว +1

    One of the best starter bash video on TH-cam

  • @frankenweeny8785
    @frankenweeny8785 ปีที่แล้ว +54

    This entire course is like an entire semester condensed into less than one hour, impressive!

    • @goldbergsam1540
      @goldbergsam1540 2 วันที่ผ่านมา

      as a data scientist major my class teach it not entire semester not half semester, but only one session and expect us to learn much more than this.

  • @kaustavchakrabarti1967
    @kaustavchakrabarti1967 ปีที่แล้ว +18

    This has been my first online coding course and I really enjoyed the session. The language was very comprehensive and audience friendly.

    • @Entropy67
      @Entropy67 ปีที่แล้ว +2

      First online coding course, nice! I recommend the other videos on this channel, you can basically teach yourself anything with enough commitment.

  • @iandotjs
    @iandotjs ปีที่แล้ว

    Been waiting for this. Thank you so much, FCC! 🤘

  • @ayushkapoor305
    @ayushkapoor305 หลายเดือนก่อน

    The video is so well structured. Half way through the video but couldn't stop myself from appreciating the efforts that have been put up for making this.

  • @abiodunbabalola451
    @abiodunbabalola451 6 หลายเดือนก่อน +1

    Wow. What a great course! This is by far the best bash scripting on the internet.

  • @giancarlovalentin9569
    @giancarlovalentin9569 ปีที่แล้ว +30

    Que bueno que estén incluyendo diferentes pistas de audio en su vídeos, esta genial!

  • @mhmdmd9525
    @mhmdmd9525 11 หลายเดือนก่อน +2

    I really liked it and enjoyed, it was an fantastic course. Short but contained more valuable information about bash.
    thank you so much.

  • @anandprakash2483
    @anandprakash2483 ปีที่แล้ว +2

    Excellent ! Watched and practiced all commands in one go. This bash primer only requires very basic linux knowledge beforehand.

  • @ssmith5048
    @ssmith5048 ปีที่แล้ว +3

    Hey, nice tutorial-I had to smile when you mentioned Atom as an option for a text editor. I still have a copy installed, but was surprised you mentioned it since it has been discontinued.

  • @funkyboy4882
    @funkyboy4882 ปีที่แล้ว +3

    Completed the lecture, and yes it was amazing, hoping to see more such lectures. ✌✌✌✌

  • @BrunO-dy9ro
    @BrunO-dy9ro ปีที่แล้ว +29

    This literally came right when i needed it, thank you so much.

  • @muyivushafiq8389
    @muyivushafiq8389 8 หลายเดือนก่อน +2

    If you had some programming background, this must have been an awesome tutorial for you. I've enjoyed this. Thanks to FCC and Instructor!

  • @rachit_joshi
    @rachit_joshi 9 หลายเดือนก่อน +1

    thank you so much. it was an amazing experience learning bash scripting with the amazing mentor here !!!

  • @vadivelan4228
    @vadivelan4228 11 หลายเดือนก่อน

    Great tutorial, I was searching this for a long time.

  • @cuthbertmilligen
    @cuthbertmilligen 6 หลายเดือนก่อน

    Great video! To make it even better I'd suggest that you
    a) add "
    " to your PS1 variable so that your typing always starts at the left margin instead of somewhere far out on the right
    b) use a more readable color scheme - dark blue on black is pretty well unreadable

  • @vijayjeee8806
    @vijayjeee8806 ปีที่แล้ว +2

    Thank u team, it is not easy make courses like this. Lot of love from India ❤

  • @s4nzuu921
    @s4nzuu921 ปีที่แล้ว

    I was just looking for Bash scripting tutorial and FCC uploaded one, nicee

  • @alejandrorobles4921
    @alejandrorobles4921 ปีที่แล้ว

    Thank you, for the audio in Spanish, I hope you continue the same, I wish you good luck and that you continue teaching.

  • @mhdunknown
    @mhdunknown ปีที่แล้ว +7

    If you're on macOS and the ${1,,} syntax isn't working for you at 25:19 it's because mac ships with a very old version of bash, and this syntax is only supported in bash 4.0+
    Instead use the tr command to transform the first argument to lowercase, and use the

  • @Torviticus
    @Torviticus 3 หลายเดือนก่อน

    This is really helpful. I regret not looking into bash scripts sooner.

  • @hosqu_
    @hosqu_ ปีที่แล้ว

    Exactly when I needed it! ♥

  • @fmaylinch
    @fmaylinch ปีที่แล้ว +9

    43:00 I think sed and awk (and grep) are specially useful when piped after some output. It would be useful to see examples of that usage.

  • @hexbinoban6170
    @hexbinoban6170 ปีที่แล้ว +11

    Good !
    A PowerShell & batch scripting tutorial would also be nice.

  • @dynamix9916
    @dynamix9916 4 หลายเดือนก่อน

    Thanks. Great introductory video.

  • @lucianaquiroga4405
    @lucianaquiroga4405 ปีที่แล้ว +2

    lo escucho en español!! genial!! (no se si está subido así, o si yt tiene una nueva funcionalidad que lo traduce sólo. Justo Bash lo que vendo buscando para complementar mi conocimiento básico en Linux. Gracias FreeCodeCamp

  • @denovo3949
    @denovo3949 ปีที่แล้ว

    Very helpful video. Thank you! -❤‍🔥🎇

  • @thething6268
    @thething6268 ปีที่แล้ว +1

    no waaaaay ...... i just started learning bash today and the video came out

  • @joecrak249
    @joecrak249 6 หลายเดือนก่อน

    SUBSCRIBED!! hey Herbert just wanted to give a BIG THANKS for the content im a bit of a late bloomer to this "but better late than never" Ive watched this about 3x now

  • @Hassan-lv9di
    @Hassan-lv9di หลายเดือนก่อน

    Thank you that was really a beginner friendly guide.
    Just a quick fixage, in 23:50 double quotes and single quotes work as well.

  • @PolyCodeOfficial
    @PolyCodeOfficial ปีที่แล้ว +2

    Wow, this was very helpful! Thank you for explaining it well!

  • @alexnovik
    @alexnovik ปีที่แล้ว

    Great tutorial!

  • @kevinramon9855
    @kevinramon9855 ปีที่แล้ว +6

    Esta traducido a español 😊, me sorprendió full

  • @SandyLearner
    @SandyLearner ปีที่แล้ว +2

    Thanks for Course.
    Also in future Please make video on Powershell 7 and how to use in Cross Platform related to Cloud DevOps Automation

  • @abdurrehmankhalid2290
    @abdurrehmankhalid2290 ปีที่แล้ว +2

    First of all thank you for making this tutorial, but I faced some problem being a beginner.
    The first thing is that one simple concept consists of other different concepts, it would have been a better to keep things simple in order to explain the current concept. One example is that in case of arrays, there are three concepts combined which are arrays, loops and word counting, which made the understanding of the looping through the array very difficult.

  • @Wuhihihaha
    @Wuhihihaha ปีที่แล้ว

    very usefull this what im needing thx codecamp

  • @MohitKhare
    @MohitKhare 8 หลายเดือนก่อน

    Thanks, that was helpful.

  • @thenoob4208
    @thenoob4208 ปีที่แล้ว +2

    increible porfin puedo tomar el curso en español

  • @mdbarin2014
    @mdbarin2014 7 หลายเดือนก่อน

    Thanks man. Cool

  • @aditya__exe
    @aditya__exe ปีที่แล้ว +1

    I literally needed this the most today and you gave it! How do you know?

  • @TwoTimesTwentyOne
    @TwoTimesTwentyOne ปีที่แล้ว

    Excellent :)

  • @nikolanikola1497
    @nikolanikola1497 7 หลายเดือนก่อน

    Great!

  • @timtom3403
    @timtom3403 9 หลายเดือนก่อน

    reall nice beginners tutoral

  • @TrueSQN
    @TrueSQN ปีที่แล้ว

    apt-get install nano - should be first :D great tutorial!

  • @Arsche
    @Arsche ปีที่แล้ว

    so I love this shell

  • @cpqvenom
    @cpqvenom ปีที่แล้ว

    Atlast!!!

  • @davoodd1638
    @davoodd1638 ปีที่แล้ว

    Hi sir, thanks for your informative video, I was wondering which distro you used to make this video. Thanks

  • @ApenasSandokhan
    @ApenasSandokhan ปีที่แล้ว +1

    Wow... Let's mastering shells scripting.

  • @Bricky2021
    @Bricky2021 2 หลายเดือนก่อน

    Next video request: how to write a minimalistic programming language on bash!❤❤❤

  • @garfield-pro
    @garfield-pro ปีที่แล้ว +7

    He just scratched the surface. We need to dig deep on our own.

    • @coolmor9087
      @coolmor9087 4 หลายเดือนก่อน

      but how do we read more or do we visualize logically??

  • @srsr6099
    @srsr6099 ปีที่แล้ว

    Thank you fcc❤

  • @brayancarabali
    @brayancarabali ปีที่แล้ว

    🎉🎉🎉 muchas gracias 🎉🎉🎉

  • @Anonymous34958
    @Anonymous34958 4 หลายเดือนก่อน +1

    finally, I know how to exit vim. thanks, FCC

  • @random_things2023
    @random_things2023 ปีที่แล้ว

    i kinda love it but we still need some bash scripting courses

  • @Jacob-ABCXYZ
    @Jacob-ABCXYZ ปีที่แล้ว

    Hey that's a banger

  • @enclave2k1
    @enclave2k1 4 หลายเดือนก่อน

    #!/bin/bash/
    input=${1,,}
    case $input in
    "yes" | "no" | "maybe")
    echo "Can you repeat the question?"
    ;;
    "malcolm")
    echo "Life is unfair"
    ;;
    "help")
    echo "I don't know"
    ;;
    *)
    echo "You're not so big"
    ;;
    esac
    Thanks for the tutorial, was fun.

  • @andersonmendoza9959
    @andersonmendoza9959 9 หลายเดือนก่อน +1

    Deberían hacer eso con todos sus videos de su canal original, ya que tienen mucho más contenido en el que en el canal en español, deberían continuar con django rest framework

  • @Mintberrycrunch982
    @Mintberrycrunch982 5 หลายเดือนก่อน

    I will never use VIM! but great tutorial. Thanks again!

  • @pragathishraja3460
    @pragathishraja3460 ปีที่แล้ว

    You saved me😊

  • @SandyLearner
    @SandyLearner ปีที่แล้ว +4

    Hi , Thanks for adding another silent yet useful language . Couple of yrs popularity of forgotten language started increasing as mostly underline Linux systems still for easy solution , bash is always available w/o modification
    Pls make detail 6-7 hr video in future providing real life examples related Cloud Linux Automation DevOps etc 😊😊

  • @yogeshlinganna521
    @yogeshlinganna521 ปีที่แล้ว

    This tutorial was very helpful and easy to follow. Thanks.

  • @johnvardy9559
    @johnvardy9559 ปีที่แล้ว

    between bash and powershell what do you recommend? for cloud azure :/

  • @kidcobain1
    @kidcobain1 ปีที่แล้ว +3

    en español.. excelente!

  • @tony-go-code
    @tony-go-code 10 หลายเดือนก่อน

    Thank you

  • @pmitchelle
    @pmitchelle ปีที่แล้ว

    Is it possible to create a bash script to stop/start tomcat and holly services as well as reboot a server?

  • @illegalsmirf
    @illegalsmirf ปีที่แล้ว +1

    Can we please have a course on practical Ansible

  • @mazal-bb
    @mazal-bb 10 หลายเดือนก่อน

    I'm enjoying the course as well. Although I'm only a third of the way finished, I don't want to neglect offering this comment, or query really.. anyone else having trouble using echo without enclosing string in quotation marks? My terminal spat back at me, "no matches found: name?" It wasn't hard to figure out it was the missing quotes that annoyed my terminal-along with the '?.' It was worked fine if I didn't code the string in the form of a question, but better of course with the " ". Seems like quotes aren't always required for certain setups; but maybe best practice? I'll be curious is this is addressed later in the session. Great fun, though!

    • @krishnanigalye1173
      @krishnanigalye1173 8 หลายเดือนก่อน +1

      Wow..I spent almost an hour to figure this out. Thanks bro.

  • @hereliesadvaith
    @hereliesadvaith ปีที่แล้ว

    Thanks

  • @user-cf8bs5bg9q
    @user-cf8bs5bg9q 5 หลายเดือนก่อน

    informative

  • @gatjuatwicteatriek4590
    @gatjuatwicteatriek4590 ปีที่แล้ว +1

    This is my free university.

  • @hotrodhunk7389
    @hotrodhunk7389 ปีที่แล้ว +1

    My bash free code camp broke 😢... Have to start it over. Anyone know how to fix it?
    Code road just keeps loading and won't finish. Followed all the trouble shooting

  • @luloxeth
    @luloxeth 24 วันที่ผ่านมา

    Nice tutorial, it felt so short

  • @ramon9789
    @ramon9789 ปีที่แล้ว +1

    The Spanish audio is great, but can I would like to here it in English if it is possible. How can I switch to original audio? Or is this the original audio?

  • @samoylov1973
    @samoylov1973 ปีที่แล้ว

    Nice and useful! Liked the style and tempo. But a few wishes: command line prompt in this video is ugly and takes valuable space (that's why example commands "jump" to next lines, btw). It could be done in style even in WSL. And to this GNU/Linux in that mediocre OS that is called windows. Why? Why you are trying, as saying goes, "get tonsils through the bottom"? 😉

  • @ariolaravencenteno8115
    @ariolaravencenteno8115 8 หลายเดือนก่อน

    what compiler you use admin is that online or offline?

  • @pj-nz6nm
    @pj-nz6nm ปีที่แล้ว

    I was looking for shell scripting few hours ago.

    • @leonstone3443
      @leonstone3443 10 หลายเดือนก่อน +1

      did you find it?

  • @haricharangv
    @haricharangv 11 หลายเดือนก่อน

    is bash and shell scripting different??? i know shell scripting so should i require to learn bash seperately

  • @berlincmos
    @berlincmos 9 หลายเดือนก่อน

    difficlt to recognize the code everything is dark ? the words and the command window

  • @fmaylinch
    @fmaylinch ปีที่แล้ว

    11:38 here it would be good to run ls -l again and show the permissions after chmod

  • @untold8718
    @untold8718 ปีที่แล้ว

    Can you make tutorials on verilog, vhdl coding

  • @noureldin5611
    @noureldin5611 4 หลายเดือนก่อน

    32:00 Seriously what the **** is this syntax !!!

  • @VideoramaTravel
    @VideoramaTravel ปีที่แล้ว

    Why should not to use :x in vim instead of :wq?

  • @dobingify3130
    @dobingify3130 ปีที่แล้ว

    chmod is not working in my MINGW64 Hyper Terminal, how can i fix this??

  • @MatveiPB8
    @MatveiPB8 ปีที่แล้ว

    Que bien. Hagan cosas en español para los hispanohablantes

  • @gyanashekka
    @gyanashekka ปีที่แล้ว

    Thanks, I completed your course. ✅

  • @nicktucker3437
    @nicktucker3437 6 หลายเดือนก่อน

    14:52 last name instead of list name, I make this kind of mistake a lot, too.

  • @Arsche
    @Arsche ปีที่แล้ว

    Bash is maincharactor in FF12.

  • @augustinegideon8059
    @augustinegideon8059 ปีที่แล้ว

    Wow.

  • @andrejesus.
    @andrejesus. 4 หลายเดือนก่อน

    to jump all the linux basics go to minute 25.

  • @RhythmReels97
    @RhythmReels97 8 หลายเดือนก่อน

    Day 1

  • @subhanisk7790
    @subhanisk7790 ปีที่แล้ว

    Automate services to start stop script

  • @Entropy67
    @Entropy67 ปีที่แล้ว

    Damn, its really easy if you're already familiar with Linux environment

  • @oscarms6067
    @oscarms6067 ปีที่แล้ว

    Thank you for the translation to spanish... But beeing a spanish native speaker, I cant't hardly understand the audio. I'd rather listen to an English audio version to be able to understand the content.

  • @aram5642
    @aram5642 6 หลายเดือนก่อน

    11:15 30 Dec 26 - back to the future!

  • @vamshikrishna8939
    @vamshikrishna8939 ปีที่แล้ว

    We want Full Stack development

  • @k.m.tanzibulahmmed9789
    @k.m.tanzibulahmmed9789 10 หลายเดือนก่อน

    link of your linux video please?