A Beginner's Introduction to BASH Shell Scripting

  Рет қаралды 286,374

Joe Collins

Joe Collins

Күн бұрын

How to write basic shell scripts and a look at more advanced scripting for the beginner.
"The Linux Command Line" by William Shotts: linuxcommand.org/tlcl.php
Check out www.ezeelinux.com for more about Linux.

Пікірлер: 228
@git_t0v
@git_t0v 3 жыл бұрын
as soon as he said that he was a late bloomer to linux/bash scripting i was hooked because i am too. Thank you!
@scootergirl3662
@scootergirl3662 3 жыл бұрын
Same here - I am kicking myself for not learning it earlier, but oh well
@tylerstevens9022
@tylerstevens9022 3 жыл бұрын
as soon as i read this comment he said that lol
@anthonydrew9437
@anthonydrew9437 2 жыл бұрын
Instablaster
@Sarahelizabeth_
@Sarahelizabeth_ 2 жыл бұрын
I love that you include your mistakes and show how you go about fixing them, super helpful 😁
@EzeeLinux
@EzeeLinux Жыл бұрын
It tells the shell that it's a script and tells it what command interpreter to use. #! = script, /binbash = the cli to use.
@ophawku
@ophawku 5 жыл бұрын
Thanks Joe! Good info and glad to see you back in the groove.
@ianlong4704
@ianlong4704 5 жыл бұрын
You were reading my mind today. I needed a simple script this morning and had no idea how to make it.
@christinashupa5851
@christinashupa5851 5 жыл бұрын
Thank you, I've been using Linux Mint for a year or so. I'm just starting to play with different commands in terminal and want to learn to use them. Beginners tutorials like this for writing useful scripts is what I was looking for. Thank you again
@AndrewAHayes
@AndrewAHayes 5 жыл бұрын
I used to use the shell in Amiga-Dos on the Amiga and Xtree in MS-DOS quite a bit, a very long time ago and enjoyed the control I had over the system, I have done a little bit of scripting on Raspians shell on the Raspberry Pi, this has inspired me to take it further! Thanks for the video Joe and the book recommendation which I will download and print if it's not too large.
@Jegan_Kanthasamy
@Jegan_Kanthasamy 9 ай бұрын
This video is an eye opener for me, I always though Shell scripting is very tough. but after watching your video, It feels easy for me, So I'm gonna give it a try.
@MarzJonp
@MarzJonp 4 жыл бұрын
I found this tutorial very comprehensive and a good jump off point to do some research. Thank you.
@declanmoran1894
@declanmoran1894 5 жыл бұрын
Awesome Joe ! Thanks , I like to see the mechanics of how it all works .
@MdShamimRahman
@MdShamimRahman Жыл бұрын
Much details in everything. People shouldn't fear Linux system if they come to Joe's channel.
@kamranabid5557
@kamranabid5557 3 жыл бұрын
Thanks for uploading this i have a practical assessment due soon and needed to research and learn how to script in bash! This has been extremely helpful!
@eyes1719
@eyes1719 Жыл бұрын
great video for beginners... and loved how you showed mistakes and how to fix them... look forward to seeing more of your videos
@huckleberry582
@huckleberry582 5 жыл бұрын
Glad to see you back at what you do so well. Teach on...
@Hevander75
@Hevander75 4 жыл бұрын
hey man I really appreciate you for taking the time to make this video
@PedroDominguez15
@PedroDominguez15 2 жыл бұрын
Watching this in 2021 and all I can say is that you sir have inspired me to embark on my forgotten IT Journey. If I make to the big leagues Joe Collins will receive credit. Much appreciated !!
@alf.2929
@alf.2929 5 жыл бұрын
Thanks Joe. Just what I needed.
@G0USL
@G0USL 5 жыл бұрын
OUTSTANDING video, Cheers, The book is VERY well written. Even I am getting it!! Thanks again
@philippe6724
@philippe6724 Жыл бұрын
Joe, you're just a master at teaching Unix! Thank you for your precious time!
@jeffreynunes2508
@jeffreynunes2508 5 жыл бұрын
Joe clearly you truly belive in in what linux stands for. Free and open!! And so should knowlage!! A great video. And Cleary explained. Thanks for your work!!!
@l.elizabethaldana4985
@l.elizabethaldana4985 3 жыл бұрын
Excellent! easy to understand and follow up; great job!
@ronaldallanquilao7689
@ronaldallanquilao7689 5 жыл бұрын
Thank You so much for sharing your knowledge. i find this very helpful
@Bit930
@Bit930 3 жыл бұрын
I made my first script to run a command on startup for my raspberry pi after watching your video . Thanks keep them videos coming
@jeremyfeather
@jeremyfeather 5 жыл бұрын
Joe thanks so much, this is spot on! Even the mistakes help in the learning process! keep up the great work!!!
@ericc461
@ericc461 3 жыл бұрын
Thanks again. Not too fast, not too long. A good review for me.
@yankeesouth
@yankeesouth 2 жыл бұрын
your honesty and candor just got a subscribe from me. Thank you for making this content. I learned from your video.
@eznix
@eznix 5 жыл бұрын
Cool video. I started writing scripts about 4 months ago knowing nothing. Google was my best friend. Every time I had an idea, I just googled the question and it got me started. Every question that came up, I googled it and got the answer. Now I am ready for a book, but Google got me started. Thanks.
@Hexbyte965
@Hexbyte965 5 жыл бұрын
Bravo..Bravo...Nice Video Joe. Keep -em coming.
@mcnits
@mcnits Жыл бұрын
Man this is so beautiful! You explain this so well. Thank you so much
@otdefence4169
@otdefence4169 4 жыл бұрын
@Joe Very good video's you making. Nice video and audio quality. Nicely done!
@staj
@staj 4 жыл бұрын
This was Super Informative, thanks a lot Sir.
@humanbeing_
@humanbeing_ 5 жыл бұрын
YES!!!!!! 👍👍👍👍 THANKS JOE! I've been waiting for more BASH & Scripting videos from you. The subject matter is interesting and actually incredibly FUN to me! And when you went (somewhat) in-depth on several points of your top 5 reasons you love LINUX video yesterday, I thought to myself "hopefully he'll release more BASH / Terminal videos". Love that you're back doing *more* LINUX uploads. And you sound happy as well (as a side note) so hopefully your time off served you well 😬 Cheers! H.B.
@pullrequest1481
@pullrequest1481 Жыл бұрын
God! I just find a gem. Following this with my nokia n900. Thank you ❤
@BumbleBeeTF
@BumbleBeeTF Жыл бұрын
Wow! Thank you! So much great information and you explain it extremely well! Thank You!
@lovinglife3675
@lovinglife3675 3 жыл бұрын
Hey Joe , great tutorial mate ... made my life with daily system admin more efficient and effective ..... Thanks again and keep up the great vids.. regards
@goku14139268520
@goku14139268520 5 жыл бұрын
There's something about your scripting videos that I really enjoy. I'm a hobiest programmer, and I've written many'a script to make repetitive tasks easier, so I'm no stranger to bash. But even though this video is aimed toward beginner to intermediate users, I find myself drawn in. Also, I find the sound of your keyboard kinda relaxing. Almost like ASMR. Lol
@Atman89
@Atman89 2 жыл бұрын
Sounds like you find the sound of his keyboard relaxing.
@omarflux1580
@omarflux1580 2 жыл бұрын
@@Atman89 lol 😂 he just said that
@johns4195
@johns4195 5 жыл бұрын
you're the man.. thanks mate..
@VernesMisadventures
@VernesMisadventures 5 жыл бұрын
Great video, Joe! Thanks!
@fahtfakcarl7695
@fahtfakcarl7695 3 жыл бұрын
Thank you for this, very informative
@refaiabdeen5943
@refaiabdeen5943 4 жыл бұрын
Cheers Mate! Much appreciated.
@ZFox57
@ZFox57 5 жыл бұрын
so cool you keep putting out content man keep it up!
@codezero6023
@codezero6023 5 жыл бұрын
Thanks Joe! Wow, I learned how to do block text without using echo
@SmerrillS
@SmerrillS 5 жыл бұрын
Dude, Joe, this was the video that's gotten a fire under my ass! I've been wanting to learn to code, for a long time, and I've been wanting to dig deeper into using the CLI. I followed the entire video, and created the two scripts you did, following the entire way. Now I'm looking for more resources, because I GOTTA learn more! Thank you for helping me get off my dead ass and do something!
@terrywang8826
@terrywang8826 5 жыл бұрын
Thanks Joe, Love this and now going to learn it, got the PDF book already.
@terrywang8826
@terrywang8826 5 жыл бұрын
LOL late bloomer I am 75, you have great personality for this stuff,
@rickforges8918
@rickforges8918 5 жыл бұрын
72
@ThirdEyeGoat369
@ThirdEyeGoat369 5 жыл бұрын
Thanks for the video!
@MonBureauLinux
@MonBureauLinux 5 жыл бұрын
Thanks Joe ! Time to me to create my own bash script :) and bip up for the share
@nateriver1662
@nateriver1662 3 жыл бұрын
thank you, man. Love your videos.
@banjoperator
@banjoperator 5 жыл бұрын
for me Mr. Collins.. your goal has been accomplished... another door opened, the light bulb switch flipped on.. .. awesome.. now there is another direcrion to go... who ever would have though that at 57, understanding operating systems and pc's could be fun,,,lol..well done vid as per usual..
@asdfghjklasdfghjkl2548
@asdfghjklasdfghjkl2548 5 жыл бұрын
57 and switched to linux??? What not to like here ☺ Welcome to linux my friend 😉
@brokebk514
@brokebk514 Жыл бұрын
thank you so much joe. this is super helpful!!!
@JeffM---
@JeffM--- 5 жыл бұрын
Thanks man, great video!
@BillFlann9
@BillFlann9 3 жыл бұрын
Nice Video Joe! Thanks for posting, you're a mensch!
@seanparry4048
@seanparry4048 4 жыл бұрын
Very good a great help. Which got me out of Jam ! and resolved a problem for me !
@dianna5619
@dianna5619 Жыл бұрын
Love this! So helpful
@CARLOSPH36
@CARLOSPH36 2 жыл бұрын
Excelente!. Gracias Joe.
@bunman2353
@bunman2353 Жыл бұрын
you are awesome. Don't be afraid of making mistakes
@immenseTie
@immenseTie 4 жыл бұрын
excellent video. ive subscibed you that good. hello from west australia. your voice is perfect to follow
@Lyunpaw
@Lyunpaw 2 жыл бұрын
Wonderful information.
@nkushgaur
@nkushgaur 2 жыл бұрын
Lovely explanation
@cryptoboner2181
@cryptoboner2181 Жыл бұрын
This is amazing thank you !
@desert_rat_workshop6080
@desert_rat_workshop6080 5 жыл бұрын
Thanks for the inspiration.
@johnredorn
@johnredorn 4 жыл бұрын
Thank you so much for this video
@skytale35
@skytale35 4 жыл бұрын
leaning VIM (VI) is painful, but wow, once you start getting it . . . it is worth the price of admission. If you're aspiring to program, learning VIM is a bonus. VIM commands are available on pretty much every major text editor, and VIM is pretty much like a plague, it is everywhere. I pretty much equate learning VIM to learning scales on a guitar, you can learn to play songs without it, but knowing it makes it easier to learn songs. You should learn it, if for no other reason than you are relatively gifted as a teacher, and if you want to program knowing vim makes you more valuable imho.
@rabinotieno6553
@rabinotieno6553 Жыл бұрын
the tutorial was enlighting I wanna know more about scripting
@strato5135
@strato5135 3 жыл бұрын
simple... informative... easy.
@frankiewait
@frankiewait 5 жыл бұрын
Very good video. Thanks for sharing your knowlage :)
@davonuk1
@davonuk1 5 жыл бұрын
Coming from an programming environment, this all makes logical sense to me. It is just a matter of learning the proper syntax for bash.
@toxicmasculine77
@toxicmasculine77 5 жыл бұрын
This is great. I spent hours perfecting syntax through about an hours worth of videos but had no idea I could run regular terminal commands as scripts. Wow, linux boggles my mind once again. I aways had a group of four or so commands I ran together whenever I booted up, but not more! Im only (what feels like) 1 minute in so I hope to see if this video includes ways to 'trigger(?)' at different times like on startup or just at time increments. Ive already watched and liked a few of your videos like shell basics but this little snippet I didnt get from anywhere else boggled my mind. There was another video on bash scripting that demanded I first learn vim, apparently its more powerful than poor 'lil Geany and Sweet Granny Nano. But I don''t need that power right now, drowning men don't need a yacht when a log will do. I could write this stuff with proper 1/2cm indentations on a piece of paper and scan it onto my computer at this point. Subscribed thrice over, i'm eating this shit up like i've been starving Cuh
@KhadijahCelestine
@KhadijahCelestine 4 жыл бұрын
have you found crons, which will help you "trigger" your scripts.
@hippolytus2993
@hippolytus2993 3 жыл бұрын
Great video!!!!
@robertcrawford4009
@robertcrawford4009 5 жыл бұрын
Great Video. I have alias that runs the Sudo apt update && Sudo apt dist-upgrade. I named it "updates".
@stephanc7192
@stephanc7192 2 жыл бұрын
Great video
@shellgenius
@shellgenius 3 жыл бұрын
It's be simple to tell anyone can understand thank u for this make video
@tpasi2020UG
@tpasi2020UG 5 жыл бұрын
I am enlightened!
@therickestpicklerick
@therickestpicklerick 2 жыл бұрын
Not lazy... just working efficiently :)
@georgewinchester6403
@georgewinchester6403 3 жыл бұрын
Thank you for putting the effort in creating this video, but you have left a fair amount of things unexplained here (for a beginner tutorial of course)
@MegaBhangu
@MegaBhangu 3 жыл бұрын
very helpful!!
@ArSaSixNine
@ArSaSixNine 3 жыл бұрын
Just saw this other video in which the guy said something like: Oh! It doesn't matter as long as you put .sh at the end. For one reason or another, I trust that she bang a lot better than the .sh Very cool video, one can tell that you actually have fun doing this kind of thing, at the very least, I know I am.
@painkillerO8
@painkillerO8 4 жыл бұрын
thanks Joe!
@eatyourspinachtomperez8700
@eatyourspinachtomperez8700 2 жыл бұрын
Thank you for this. :)
@rickforges8918
@rickforges8918 5 жыл бұрын
enlightened and confused ; thanks. takes me back to Adam Basic (Coleco ) I was president of a club here after Coleco dumped the Adam. Bash is a lot easier cause the Net and books like the two you recommend. i got'em both btw.
@sidharthabhardwaj9341
@sidharthabhardwaj9341 4 жыл бұрын
Very helpful videos Joe, thank you. I still can't find the directories I make on my windows. I' using Ubuntu, which I think is in a VM..
@gilsantiago3
@gilsantiago3 2 жыл бұрын
gracias, English is not my first language and I understood every concept
@tonyndefrufrachaha1595
@tonyndefrufrachaha1595 2 жыл бұрын
Thank U Joe!
@sumitthapa001
@sumitthapa001 2 жыл бұрын
Very nice tutorial thank you. Thank you for the book recommendation too
@mayurteli91
@mayurteli91 2 жыл бұрын
thank you for the video
@chronosVR.2763
@chronosVR.2763 2 жыл бұрын
If you are using the terminal in Ubuntu, you can also use 'gedit' instead of 'nano'.
@linux3d153
@linux3d153 5 жыл бұрын
Great! ThankYou
@agnesswakio7362
@agnesswakio7362 Жыл бұрын
i now understand. thank you
@marklambert2777
@marklambert2777 3 жыл бұрын
Gosh, "cat
@cthedosboss5113
@cthedosboss5113 5 жыл бұрын
great video thanks joe :)
@jamesbrinn9701
@jamesbrinn9701 2 жыл бұрын
I Miss yiur Linux videos
@vishaljain4915
@vishaljain4915 3 жыл бұрын
appreciate this
@RM-gm7lu
@RM-gm7lu 3 жыл бұрын
Thanks for that.
@seansean7653
@seansean7653 Жыл бұрын
Any video on how the pipe work?
@trevorvan2835
@trevorvan2835 3 жыл бұрын
this is good for are linux command line leaning
@poparab
@poparab 2 жыл бұрын
i have an idea for you, Bash scripts they was makes menus for different sigle action with scripting File managent. How we scan 2 different folders. Folder 1 is a Storage folder (sample: on the NAS). The other is on PC or workstation. We can synchronize the NAS folder with the Download folder. After that we delete the files in the download folder. My abbo is safe
@alextlima
@alextlima Жыл бұрын
I have discovered your Channel few days ago. Congratulations Collins! So I would like to ask you about how can I plan a programm or a script. Is there a method to follow? Other question: do you have suggestions about free labs to practice this knowedge?
@EzeeLinux
@EzeeLinux Жыл бұрын
Here's very good place to start: linuxcommand.org/tlcl.php
@txg8878
@txg8878 5 жыл бұрын
This was a great tutorial! Thanks for posting it. I've been using Linux since 1997 and never really dove into bash, but now I will. Thanks again.
@somedude3203
@somedude3203 5 жыл бұрын
Texas Gambler how did you manage to use Linux for over 20 years but never use Bash? Did you use a different shell?
@appalachianpatriot7364
@appalachianpatriot7364 3 жыл бұрын
At 18:06, you said "This time I am actually going to put this in my bin folder". What is the reason/ advantage of putting it in the bin folder again? I know you mentioned it earlier in the video, but I didn't understand what you meant. Thanks for the reply!
@EzeeLinux
@EzeeLinux 3 жыл бұрын
The local ~/bin is where you store personal scripts and programs. All you have to do is create it on Ubuntu based systems and it will automatically be added to the path that the system takes to find programs.
@lightningvini
@lightningvini 3 жыл бұрын
Love the video Joe, I'm on arch and the bin folder doesn't seem to get detected, what do i have to do? Logging out doesn't work
@EzeeLinux
@EzeeLinux 3 жыл бұрын
You'll need to add these lines to the end of your .bashrc file: # set PATH so it includes user's private bin if it exists if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi
@devondecenzo2658
@devondecenzo2658 2 жыл бұрын
Hi on the creating a bin fold in your home dir, is it "touch bin"? Any help on this would be great!!
@EzeeLinux
@EzeeLinux 2 жыл бұрын
mkdir ~/bin
@paulstaf
@paulstaf 2 жыл бұрын
Using bash scripting, I wrote a whole home alarm system program that uses cheap Chinese sensors to read doors, windows, leaks under sinks, can trigger a relay that sounds a siren, and if someone presses my doorbell, it takes pictures from all my security cameras and emails them to my phone along with SMS messages. All this using BASH scripting on a Raspberry PI.
Beginner's Guide to the Bash Terminal
1:14:37
Joe Collins
Рет қаралды 2,3 МЛН
Become a bash scripting pro - full course
36:00
CODE IS EVERYTHING
Рет қаралды 28 М.
GADGETS VS HACKS || Random Useful Tools For your child #hacks #gadgets
00:35
Não pode Comprar Tudo 5
00:29
DUDU e CAROL
Рет қаралды 81 МЛН
Cute ❤️🤣🍒 #shorts
00:15
Koray Zeynep
Рет қаралды 4,8 МЛН
Nonomen funny video😂😂😂 #magic
00:27
Nonomen ノノメン
Рет қаралды 15 МЛН
Bash vs ZSH vs Fish: What's the Difference?
13:32
Eric Murphy
Рет қаралды 141 М.
New Linux User: 10 Things I Wish I Knew When I First Started
23:31
Learn Linux TV
Рет қаралды 356 М.
BASH scripting will change your life
14:18
NetworkChuck
Рет қаралды 983 М.
"C" Programming Language: Brian Kernighan - Computerphile
8:26
Computerphile
Рет қаралды 1,8 МЛН
Bash Scripting Tutorial for Beginners
47:57
freeCodeCamp.org
Рет қаралды 392 М.
18 Commands That Will Change The Way You Use Linux Forever
29:50
Akamai Developer
Рет қаралды 1,2 МЛН
My 5 Favorite Linux Shell Tricks for SPEEEEEED (and efficiency)
11:06
The basics of BASIC, the programming language of the 1980s.
24:07
The 8-Bit Guy
Рет қаралды 2,3 МЛН
Bash Scripting - Variables, Arrays, If-Then-Else
38:52
DistroTube
Рет қаралды 46 М.
Тайная комната 😱
0:20
TeM4iK
Рет қаралды 3,2 МЛН
Прожил месяц в теплице безвылазно. Смогли бы так?
0:39
Сергей Милушкин
Рет қаралды 2,7 МЛН
【獨生子的日常】让小奶猫也体验一把鬼打墙#小奶喵 #铲屎官的乐趣
0:12
“獨生子的日常”YouTube官方頻道
Рет қаралды 81 МЛН