Shell Scripting Crash Course - Beginner Level

  Рет қаралды 737,603

Traversy Media

Traversy Media

Күн бұрын

This is an intro to shell scripting with Bash. We will learn what shell scripting is and create a cheat sheet with things like variables, conditionals, loops, functions, etc. We will also do things like rename multiple files.
Cheat Sheet Gist:
gist.github.com/bradtraversy/...
Command Line Tutorial:
• Linux Tutorial - Basic...
💖 Become a Patron: Show support & get perks!
/ traversymedia
Website & Udemy Courses
www.traversymedia.com
Follow Traversy Media:
/ traversymedia
/ traversymedia
/ traversymedia

Пікірлер: 534
@oosmanbeekawoo
@oosmanbeekawoo 3 жыл бұрын
For those in a hurry! Till 6:13 he explains what is Shell Scripting and how it's done: In Windows, you create .bat files with a command on each line in the file so CMD executes one-by-one. In Linux, we don't use .bat but .sh, and also, we specify a Shebang so Linux knows what interpreter to use (the default is Bash) Till 7:45 he explains Variables (i.e x = "Text") and how to make Bash distinguish between letter 'x' and our Variable 'x' Till 8:49 he tells how we can prompt the user for input with command 'read'. Terminal pauses, until data is input. To display a specific message before the blinking cursor use 'read -p ["TEXT: "]'. (-p displays the "TEXT" you provide before it collects input.) To store the data input in a Variable write the name of the Variable at the end of the command: 'read -p ["TEXT: "] VAR'
@smitmangukiya
@smitmangukiya 3 жыл бұрын
Thanks
@stuffandymakes1648
@stuffandymakes1648 3 жыл бұрын
Technically speaking, in Unix/Linux/macOS, the file extension on the file name of the script is irrelevant. People can be opinionated about using it, but it truly is only a convention. What makes your script file an executable script in Unix-like operating systems is setting the execute (x) permission on the file. Then, the shebang line (#!) tells the system what type of file it is. The first two characters (sometimes they are each 16-bit) or bytes are called the file signature or magic numbers. The shell is using the exec() system call, which uses the magic numbers to determine how to launch the file as a new process: Binary file (run the machine code inside, depending on the OS) or text file (launch an interpreter as a new process and pass it the text to interpret).
@realkarthiknair
@realkarthiknair 2 жыл бұрын
@@stuffandymakes1648 yep u dont even need an extension
@idk-jb7lx
@idk-jb7lx 2 жыл бұрын
bash scripts are more similiar to powershell scripts than they are to batch files to be completely fair. sure you can use them like you would use batch files in Windows but they're way more powerful than that since they're actual programming scripts and not just a set of instructions.
@maindepth8830
@maindepth8830 2 жыл бұрын
Thank u
@aprilmintacpineda2713
@aprilmintacpineda2713 6 жыл бұрын
Thanks Brad, I really appreciate you doing these tutorials. I think KZbin should have more people like you.
@raghulbaskar7746
@raghulbaskar7746 2 жыл бұрын
echo "Awesome Content!!!" >> Traversy Media
@Skeleton-wn2zu
@Skeleton-wn2zu 2 жыл бұрын
NAME="Raghul Baskar" echo "Nice comment ${NAME}!" >> $NAME
@KangJangkrik
@KangJangkrik 2 жыл бұрын
while 1; do echo 'Hello everyone!'; done
@yersonlasso9754
@yersonlasso9754 2 жыл бұрын
Not to be that guy but... file has no extension
@hxz2776
@hxz2776 2 жыл бұрын
@@yersonlasso9754 file extensions are not really required much outside of Windows
@adefioyes5692
@adefioyes5692 Жыл бұрын
Nailed it fr
@madferit1987
@madferit1987 6 жыл бұрын
Have I ever told you I love you man? Just what I needed
@technofool3
@technofool3 6 жыл бұрын
Thank you for taking the time to put this together. I learned so much from this, I really appreciate everything you put out.
@rambo9769
@rambo9769 3 жыл бұрын
This tutorial is timeless. Wonderful and relevant after 2 years too.
@NikhilMoreBCSE
@NikhilMoreBCSE 3 жыл бұрын
This is the best tutorial for bash scripting covered in such a short time. You really saved me
@icon458
@icon458 Жыл бұрын
I have a test in 3 hours' time and this guy just explained a whole chapter with 98 pages in 32 minutes. Thanks, man keep the videos coming💝
@omarsuriel1112
@omarsuriel1112 3 жыл бұрын
I can’t think of a more deserving person for all the success he’s got
@origamicaptain5664
@origamicaptain5664 3 жыл бұрын
I'm so happy that you aren't being condescending, but friendly as well. Clear, concise language. Much appreciated.
@Ahmed-sv9sy
@Ahmed-sv9sy 4 жыл бұрын
Amazing video man ! I learnt so much from you by following along on my computer and I can definitely say without a doubt that I'm more comfortable with bash scripting basics after I watched your video. Thanks for the educational content Keep up the good work !
@CreativeJE
@CreativeJE 4 жыл бұрын
brad your tutorials are simple straightforward thanks for making everyone's life easier thank you
@yesoreyeram
@yesoreyeram 6 жыл бұрын
OMG.. the quality and the content diversity of the channel getting improved in every video. Hats off to you.
@naqeebghazi9412
@naqeebghazi9412 6 ай бұрын
One of the best beginner videos for shell scripting. Doesnt over-explain. Great stuff!
@fvgoya
@fvgoya 6 жыл бұрын
This is a really GOOD content. Thanks Brad! It is always good to learn more about something that I know. Always learn more.
@notgate2624
@notgate2624 6 жыл бұрын
This was great and I'm happy with you changing up the material a bit. I've been wanting to learn more about System Administration and IT. I know this stuff is basic but it's still a good intro.
@evilmorty-tv1xs
@evilmorty-tv1xs 6 жыл бұрын
Been waiting for this. Great tutorial Brad!!! Very useful especially since I use a arch distro
@edilsonrj
@edilsonrj 5 жыл бұрын
Waiting for the intermediate and the advanced one! AMAZING!
@nafeemhaque3357
@nafeemhaque3357 6 жыл бұрын
You are awesome dude ! Thanks for making the world a lot easier.
@flankattack5426
@flankattack5426 4 жыл бұрын
Fantastic session - thank you Brad! This is very helpful.
@mikeigoe
@mikeigoe 6 жыл бұрын
Bookmarked - use Linux all the time in a job I'm now 3 years into and never bothered to learn this stuff when moving over from WIndows, even though I swapped out cmd for git bash a few months back on all my PCs. I don't have time to watch your KZbin videos anymore - that MERN course is taking up all my free time :D - great course btw: you have a wonderful, natural teaching style.
@priyakdey7891
@priyakdey7891 5 жыл бұрын
Dude is the MERN from Traversy ? which one and where it is ?
@omarislearning3329
@omarislearning3329 4 жыл бұрын
honest question, did you come back to it after you bookmarked it or nah? i am just wondering since i seem to never do when i bookmark stuff.
@insideTheMirror_
@insideTheMirror_ 4 жыл бұрын
plus he's a hottie ;)
@navjotsingh2251
@navjotsingh2251 4 жыл бұрын
omarislearning I do come back to things I book mark. I’ve book marked a python cheat sheet, bash cheat sheet, calculus book and a data structures/algorithms website. I’m constantly going back to them sites, so having them bookmarked is helpful.
@dineshkumarthirugnanam1301
@dineshkumarthirugnanam1301 3 жыл бұрын
You just made things simple. Not confusing by putting too much into it. Got it what's needed.👍
@heikokraemer2735
@heikokraemer2735 3 жыл бұрын
On point, very compact video. Thanks a lot for this great source for a start into bash scripting!
@kevinzhang8974
@kevinzhang8974 6 жыл бұрын
simple and very practical .... you have covered top common syntax .... thank you!
@asuezeigwe9381
@asuezeigwe9381 Жыл бұрын
I was so lost watching other content on this topic as I'm a newbie You just saved me
@ReliableRandy
@ReliableRandy 3 жыл бұрын
"I let my accent slip out a little too much there" HAHAH love it 19:57
@johnlaurenceocong4754
@johnlaurenceocong4754 2 жыл бұрын
Only For iOS?
@deadscenedotcom
@deadscenedotcom 6 жыл бұрын
This provided a couple options and commands I haven't used yet. Thank you!
@helaolange
@helaolange 2 жыл бұрын
Uploaded 3 years ago... Brad, you are the best🐐
@masihsadri
@masihsadri 5 жыл бұрын
Thank you, Brad. You are definitely the best teacher in the world.
@manueljordan317
@manueljordan317 4 жыл бұрын
Huge thanks for this video, simple and powerful to learn quickly!
@gabriel_felippe
@gabriel_felippe 6 жыл бұрын
Hey Brad, thank you! Hope to see these new tutorials!
@volder1995
@volder1995 4 жыл бұрын
I hope this helps me pass my exams at Shell,great tutorial!
@coreyaudet9656
@coreyaudet9656 3 жыл бұрын
There is so much Love and appreciation here, I was just poking around and was overcome with positivity.(I was losing all hope for humanity just prior) I'll be camping out here until I can reach an understanding of Bash without BashING something in the process. Thank you all for making it possible to enjoy learning and by supporting one another, we can all get the skills it takes to BASH Bash!
@mohammadumair7778
@mohammadumair7778 5 жыл бұрын
AWESOME TUTORIALS... Thank You so much for Uploading the Lesson!!
@charlescai236
@charlescai236 2 жыл бұрын
thanks Brad. This is really a short and sweet piece of video and one of my best used half an hour.
@Alessandro-nq3tm
@Alessandro-nq3tm 6 жыл бұрын
Amazing Brad! More on bash scripting please!!
@joseluisbeltramone599
@joseluisbeltramone599 2 жыл бұрын
Loved this tutorial! Basic as you say, but super useful. Thank you very much!
@GurcharanDhillon
@GurcharanDhillon 3 жыл бұрын
Thank You Sir, the way you explain is awesome. It directly goes into mind. I learnt a lot from your tutorials. Much respect.
@JimHenderson19
@JimHenderson19 Жыл бұрын
Great content! I like the pace, just right. Keeps you interested without overwhelming. Easy to follow along. I subscribed!
@amirnazari6427
@amirnazari6427 3 жыл бұрын
One of the best shell scripting videos! Coherent, Informative, right into the point, and time-saving.
@fxstreamer238
@fxstreamer238 3 жыл бұрын
please tell me you know the WHILE loops in other programing languages right? and how on earth this while loop that he just read and wrote from his script doesnt need any explanation of what -r is? and what the condition of the while loop is? how is this choherent and time saving? I assume you are a programmer like myself
@fayfaytu
@fayfaytu 2 жыл бұрын
This is really a great video! It has everything for a beginner to know. Concise and useful!
@manish-mk
@manish-mk 6 жыл бұрын
It's always so interesting to learn from you. You are great teacher. I have huge respect for you
@aisaacbruno9660
@aisaacbruno9660 4 жыл бұрын
it's refreshing to watch a 30 min video that I actually wanna watch, thanks for this video, I'll have a job interview about shell today :)
@Super_Cool_Guy
@Super_Cool_Guy 6 жыл бұрын
HI Brad , great video , will there be anymore videos on shell scripting ? we would like to see more from basic to advance levels .. thanks man ! 😊
@EddyVinck
@EddyVinck 6 жыл бұрын
I recently learned how to setup my own VPS with NGINX and Node on it so this couldn't have better timing, will watch it soon. Thanks Brad.
@rokzabukovec4685
@rokzabukovec4685 6 жыл бұрын
Just in time Brad! I got a paper due on sunday on bash scripting :)
@brianadams2862
@brianadams2862 6 жыл бұрын
Lucky you were
@metdelta1
@metdelta1 4 жыл бұрын
@@brianadams2862 Did we meet in The Summer of 69??
@brianadams2862
@brianadams2862 4 жыл бұрын
@@metdelta1 Nop
@cherrydrop7025
@cherrydrop7025 Жыл бұрын
Revisiting for a great refreshah. I remember watching this at random when I started at a startup based in Boston... gave me the full MA experience. Love the accent.
@robertofolikwei23
@robertofolikwei23 6 жыл бұрын
just in time, towards my preparation towards my eCPPT certification.....simple and understanding ...big thanx
@jackjax5606
@jackjax5606 4 жыл бұрын
Good stuff Brad...You always know some good content is coming up once that transition music starts. And you never dissapoint. Big up on the new content, i've always enjoyed your tutorials. And i cant wait for the JAVA stuff...lookin forward to it
@foodums
@foodums 4 жыл бұрын
Every time I click on Brad's videos I like it before the intro even plays.. Here in 2020
@ssaran2
@ssaran2 5 жыл бұрын
Thanks Brad. I was always scared of learning bash scripting until I watched your video. Subscribed :)
@snxexwinterx5570
@snxexwinterx5570 4 жыл бұрын
Thanks for making this man..been looking for a good beginner bash tutorial.
@aylliumrin7861
@aylliumrin7861 6 жыл бұрын
Awesome vid. I like the idea of the channel branching out. There is so much stuff out there and it keeps things fresh.
@demetter7936
@demetter7936 2 жыл бұрын
My name is also Brad so for a split second it freaked me the hell out when you said it.
@sreemathir5194
@sreemathir5194 2 жыл бұрын
The BEST tutorial for beginners! Thank you!!
@nacdan6451
@nacdan6451 6 жыл бұрын
Great video as always. I'd love to see some C++ tutorials!
@siddharthsoni1862
@siddharthsoni1862 4 жыл бұрын
This is an awesome tutorial. Thank you so much.
@carloszetula2307
@carloszetula2307 6 жыл бұрын
Thanks man! I really need this information, I’m new to bash but I know a little about old ms-dos
@ericedlund3140
@ericedlund3140 2 жыл бұрын
You just saved me a $20 course online, thank you.
@alphaomega4434
@alphaomega4434 3 жыл бұрын
This was really good, I appreciate it you branching out
@Marius5404
@Marius5404 4 жыл бұрын
This was amazing! Thank you!
@CYB3RC0RP
@CYB3RC0RP Жыл бұрын
Probably the best video I've found on the subject so far.
@mblackonline1059
@mblackonline1059 2 жыл бұрын
Thanks so much for making this! The examples were very helpful.
@davidconnelly
@davidconnelly 6 жыл бұрын
That was good. Thanks! I really like the idea of venturing into other areas. The ultimate for me would be to figure out how to write programmes that USE other programmes. However, I'm not too sure how to go about that.
@daoviettu2334
@daoviettu2334 2 жыл бұрын
Very practical! Every basics are all here!
@MarkJay
@MarkJay 5 жыл бұрын
thank you for making this Traversy Media!
@user-di4bt7qu2i
@user-di4bt7qu2i 2 жыл бұрын
Great video, thanks for posting. As usual, lots of good info to get me started and point me in the direction to advance. Thanks man!
@mdullash2116
@mdullash2116 4 жыл бұрын
i don't feel bored any time of learning from your channel...
@legendplonski8758
@legendplonski8758 2 жыл бұрын
Just listening to this man speak calms me down. You get my like sir.
@Mohamed-uf5jh
@Mohamed-uf5jh 3 жыл бұрын
Great Job , easy to follow and very helpful
@AyushKumar-yk9fw
@AyushKumar-yk9fw 3 жыл бұрын
Awesome tutorial! Nailed it! 🤩
@adriantan1134
@adriantan1134 2 жыл бұрын
Thanks. Very good and straight to the point tutorial.
@sfutrell2339
@sfutrell2339 3 жыл бұрын
Thank you! I am cramming for my Linux +exam and this helps a lot!
@marklambert2777
@marklambert2777 3 жыл бұрын
In most of these beginner tutorials, I never see grep. That was one of the first commands I extensively used and is quite a simple one to explain.
@eoussama
@eoussama 6 жыл бұрын
Just when I wanted to get into bash, nice tutorial Brad.
@anggasukmabahari6342
@anggasukmabahari6342 4 жыл бұрын
Amazing video. Thank you sir, so helpfully!
@khalidelgazzar
@khalidelgazzar 4 жыл бұрын
Awesome refresher. Thanks Brad
@keithberjeron763
@keithberjeron763 2 жыл бұрын
Thank you so much for this video. I'm new to Linux and I've been eager to script. My only experience with scripting came from mIRC from when I was about ten, and a text- based game builder called adrift. I'm happy I'm trying Linux and this video makes Me excited to explore the possibilities.
@omerkaraca1825
@omerkaraca1825 6 жыл бұрын
You are really great as usual !! I immediately liked the video. Fortunately, you are here. Thank you very much for eveything..
@yvzc4n
@yvzc4n 6 жыл бұрын
Thanks Brad awesome Video as always
@kauthamkrishnan982
@kauthamkrishnan982 2 жыл бұрын
This is so helpful for a beginner. Thanks!
@zacharymiles4300
@zacharymiles4300 4 жыл бұрын
Great video. Your teaching is very easy to follow.
@BobTrieste
@BobTrieste 2 жыл бұрын
Brad all of your videos are great ! Thank you
@AniBOTSBrothers
@AniBOTSBrothers 5 жыл бұрын
This was really cool!I hope you do more videos on this!
@melsaied101
@melsaied101 2 жыл бұрын
Thank you so much, it was easier than I expected, or you are such a good teacher :)
@CheiithooCat
@CheiithooCat 6 жыл бұрын
Love this channel... great job man
@derekbaker2099
@derekbaker2099 2 жыл бұрын
Really enjoyed this and it was super helpful! Thank you
@user-if2qe8mf8s
@user-if2qe8mf8s 5 жыл бұрын
Good job Brad! :) Java tutorials is a great idea, we'll be waiting :)
@priscaonyebuchi5825
@priscaonyebuchi5825 Жыл бұрын
This was amazing. I wish I found this earlier. Thank you so much!
@benardadhinga8714
@benardadhinga8714 4 жыл бұрын
What a genius! A natural!!
@cavinalbertbelga5090
@cavinalbertbelga5090 6 жыл бұрын
Great tutorials as always!
@ruchiradhar1589
@ruchiradhar1589 3 жыл бұрын
This is honestly one of the best Shell Scripting tutorials out here. Thank you so much for this amazing video, it really helped me a lot!
@abdullahahmed8468
@abdullahahmed8468 2 жыл бұрын
i have loved this Crash Course video because it has rich content with real case examples
@ericjaniak1015
@ericjaniak1015 2 жыл бұрын
Much respect to you, you give me a lot of useful tech.
@rauljg143
@rauljg143 Жыл бұрын
This was fantastic, thank you!
@sayanmallick2644
@sayanmallick2644 6 жыл бұрын
Love your Tutorials. Keep up the good work. One little request, can we please have a kubernetes tutorial. Please.
@lee_johnson
@lee_johnson 2 жыл бұрын
Your teaching style is awesome man
@Gwittdog
@Gwittdog 4 жыл бұрын
Love the video! thanks for all of the awesome videos
@leosmilesu2
@leosmilesu2 4 жыл бұрын
God bless you, Brad@Traversy Media. Thank you.
@sergeynaruzhiny7422
@sergeynaruzhiny7422 2 жыл бұрын
awesome course, and good cheat sheet. thanks a lot
A Beginner's Introduction to BASH Shell Scripting
44:24
Joe Collins
Рет қаралды 286 М.
60 Linux Commands you NEED to know (in 10 minutes)
10:50
NetworkChuck
Рет қаралды 1,2 МЛН
LA FINE 😂😂😂 @arnaldomangini
00:26
Giuseppe Barbuto
Рет қаралды 18 МЛН
КАК ГЛОТАЮТ ШПАГУ?😳
00:33
Masomka
Рет қаралды 1,9 МЛН
Don't Waste!🚫 Turn Ham Into Delicious Food😊🍔 #funnycat #catmemes #trending
00:25
Are You Too Dumb To Code? A Chat About Imposter Syndrome
7:08
Traversy Media
Рет қаралды 60 М.
you need to learn BASH Scripting RIGHT NOW!! // EP 1
12:14
NetworkChuck
Рет қаралды 934 М.
Become a bash scripting pro - full course
36:00
CODE IS EVERYTHING
Рет қаралды 26 М.
Developer Stereotypes to Make You Haha :)
5:52
Marko
Рет қаралды 27 М.
Bash Scripting on Linux (The Complete Guide) Class 05 - If Statements
31:43
Linux Operating System - Crash Course for Beginners
2:47:56
freeCodeCamp.org
Рет қаралды 2 МЛН
BASH scripting will change your life
14:18
NetworkChuck
Рет қаралды 981 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 3,9 МЛН
Bash in 100 Seconds
2:33
Fireship
Рет қаралды 1,4 МЛН
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 1 МЛН
Samsung mobile phone waterproof display. samsung mobile phone digital s23ultra  #shorts
0:15
Why spend $10.000 on a flashlight when these are $200🗿
0:12
NIGHTOPERATOR
Рет қаралды 16 МЛН
Интел подвинься, ARM уже в ПК!
14:06
PRO Hi-Tech
Рет қаралды 147 М.
Опасная флешка 🤯
0:22
FATA MORGANA
Рет қаралды 445 М.
Компьютерная мышь за 50 рублей
0:28
Какой Смартфон Купить в 2024 Году? Выбор бюджетного телефона
14:21
Thebox - о технике и гаджетах
Рет қаралды 253 М.