Writing your First Shell Script for Linux Tutorial

  Рет қаралды 296,067

Kris Occhipinti

Kris Occhipinti

8 жыл бұрын

filmsbykris.com
/ metalx1000
Playlist
• The Linux Shell - 2016...
This video was sponsored by:
Karl Arvid
John Tedesco - stainlesssteeltoolwrap.com/
Steven C. Morreale
For help: filmsbykris.com/irc
FaceBook: / 225113590836253

Пікірлер: 95
@hawkeye4359
@hawkeye4359 4 жыл бұрын
Universities focuses on programs and scripts while the students don't understand the language. This video is a lifesaver
@LazarakisSokratis
@LazarakisSokratis 3 жыл бұрын
exactly
@stinkbonk
@stinkbonk 5 жыл бұрын
Studying informatics at the university in Ghent and this is my last resort for the exam coming tomorrow, thanks for helping me out!
@ipoop4359
@ipoop4359 3 жыл бұрын
Hey Im also from Belgium. What are you studying rn?
@lordxkronoz
@lordxkronoz 2 ай бұрын
What a lifesaver you are, Thanks!
@amybanks8224
@amybanks8224 2 жыл бұрын
This was so helpful, thank you very much! :)
@mortenlund1418
@mortenlund1418 2 жыл бұрын
Thanks for sharing. Very informative.
@exoticme4760
@exoticme4760 5 жыл бұрын
Thanks ,This is great for begining ❤
@luisalfonzogonzalez2265
@luisalfonzogonzalez2265 4 жыл бұрын
Easy, straight to the point... All I needed. Thanks!
@yunche9671
@yunche9671 5 жыл бұрын
Thanks for teaching.
@corrinalakin4310
@corrinalakin4310 4 жыл бұрын
Great video. The only thing I would suggest adding is what the -p and -e mean. I understand when to use them in the given context of the video, but don't feel it was explained what they mean so I am not sure how else I can use them in the future.
@jpedithe2171
@jpedithe2171 2 жыл бұрын
Hello, je suis français et découvre ta chaîne , je débute sur Linux et j'ai appris des choses interessantes , ta video est bien car c'est du concret au moins . Merci Have a good day guy. Saragosse
@mattmovesmountains1443
@mattmovesmountains1443 3 жыл бұрын
Very helpful - thank you! Do you happen to know if I can write a script that would be triggered by a specific key combination (rather than upon start-up)? And is it possible to use scripts to check and report on the status of other apps that are running? In particular I'm making an external button that I'd like to run a script that will tell me if zoom is open, and if zoom is muted. I know mac os does this, but not sure how to accomplish with linux.
@amateurprey7802
@amateurprey7802 8 ай бұрын
My instructor uses this video in her curriculum - Nice job dude!!
@DigitalMetal
@DigitalMetal 7 ай бұрын
Great! I love hearing that!
@Kidpunk98
@Kidpunk98 4 жыл бұрын
Dude, you are a legend. thank you so mucn!
@thabangtimmy6268
@thabangtimmy6268 4 жыл бұрын
How dis he add those names to the files
@congamike1
@congamike1 2 жыл бұрын
This is helpful. Thanks
@vampcell
@vampcell 2 жыл бұрын
great video, really well explained.
@DigitalMetal
@DigitalMetal 2 жыл бұрын
Glad you liked it!
@DavinderEvolution
@DavinderEvolution 3 жыл бұрын
Thank you so very much, this helped me start my assignment. THANKS A LOT
@DigitalMetal
@DigitalMetal 3 жыл бұрын
Glad it helped!
@DavinderEvolution
@DavinderEvolution 3 жыл бұрын
@@DigitalMetal I didn't fail an assignment, thank you from the bottom of my heart
@rgh1986aka199
@rgh1986aka199 7 жыл бұрын
thank you for the short effective tutorial.
@dhuxdheerdahir2736
@dhuxdheerdahir2736 2 жыл бұрын
Thank you.
@SRoopeshN43
@SRoopeshN43 3 жыл бұрын
Thank you man
@TheMaro57
@TheMaro57 10 ай бұрын
thanks dude, learned something new today...
@DigitalMetal
@DigitalMetal 10 ай бұрын
No problem!
@Negijicoder
@Negijicoder 4 ай бұрын
8 years back... and now we are doing same thing..
@mr.hemsley1238
@mr.hemsley1238 4 жыл бұрын
Hey, I appreciate you being succinct. You have NO IDEA how horrible these other videos were.
@greatsea
@greatsea 3 жыл бұрын
how would I create a custom command 'mvt' that automatically moves 'trash' files to directory ~/Trash ?
@findprateek
@findprateek 3 жыл бұрын
very helpful
@aliqishahbudin7693
@aliqishahbudin7693 2 жыл бұрын
hey can i have a textbook or a manual book on all the name of the symbol and its function ploz??or where do i find one and whats its called
@13thravenpurple94
@13thravenpurple94 10 ай бұрын
Good stuff 👍 Thank you 💜
@DigitalMetal
@DigitalMetal 10 ай бұрын
Glad you enjoyed it
@tahakhezami8435
@tahakhezami8435 9 ай бұрын
Well presentesd, thank you
@DigitalMetal
@DigitalMetal 9 ай бұрын
Glad it was helpful!
@rolandwehye2861
@rolandwehye2861 6 жыл бұрын
How to write a script shell indicating names, phone numbers, and email addresses?
@brusslee1814
@brusslee1814 7 жыл бұрын
At 5:37 you say in your script echo "$name" >> names.txt is echo needed there? i mean if it was like this: $name >> names.txt would it have any difference in the outcome? thanks in advance
@DigitalMetal
@DigitalMetal 7 жыл бұрын
Yes, it is completely different. With out echo the shell will think that $name is the command you are trying to run. for example if 'name="john"' if you run "$name" without 'echo' first, the shell will try and run the command 'john'. Which probably does not exist and give you an error. If command 'john' does exist, it would put the standard output of that command into the files 'names.txt', not the name 'john'.
@ousmanealamakaba3135
@ousmanealamakaba3135 2 жыл бұрын
GREAT
@ShivangiSingh-wc3gk
@ShivangiSingh-wc3gk 4 жыл бұрын
What does -e do with the echo?
@ricksmainacc1004
@ricksmainacc1004 4 жыл бұрын
how do u save that
@tydengr
@tydengr 3 жыл бұрын
yes, I enjoy this video
@DigitalMetal
@DigitalMetal 3 жыл бұрын
Awesome!
@ankitpati6100
@ankitpati6100 5 жыл бұрын
everything is working good but when it came to running script it is showing permission denied .please suggest posssible reason
@sangesherpa4832
@sangesherpa4832 6 жыл бұрын
Do i have to type echo in text editor? And how did you create a bash file?
@NoBody-tz4fb
@NoBody-tz4fb 6 жыл бұрын
Sange Sherpa .sh
@Maarrich
@Maarrich 7 жыл бұрын
do we need a particular distro or any linux distro will work?..i have kaliu and mint, which will be more useful for shell scripting
@maxsteel9684
@maxsteel9684 7 жыл бұрын
Both) All of them. Under the hood they are all the same.
@Ryan-le2im
@Ryan-le2im 3 жыл бұрын
how many enter keys have you broken?
@I65Sports
@I65Sports 7 жыл бұрын
How do I write a script that ask for a user name when opening the shell?
@DigitalMetal
@DigitalMetal 7 жыл бұрын
Well, you write the script as I did in the video. If you want to have your script run when your shell opens, and your shell is BASH you can use your '.bashrc' file. I talk about this some in this video: kzbin.info/www/bejne/pWK6f5-MpsufrbM
@_mr.lala_patel_
@_mr.lala_patel_ 3 жыл бұрын
Present sir, Ankit
@zizizineb8722
@zizizineb8722 5 жыл бұрын
thanks so fucking much i think u have to be our teacher
@CCKkristy
@CCKkristy 5 жыл бұрын
Thanks Kris!! But after I typed echo "John" >> names.txt, the "John" is added next to Jerry. Can you advise why this is happening? Anything I can edit the name.txt? Thanks!!
@sayanghosh6996
@sayanghosh6996 5 жыл бұрын
If your file is not terminated then this might happen. try writing : echo -e " John" >> names.txt instead
@davideareias7876
@davideareias7876 3 жыл бұрын
damn your soo good you dont even tought how to save the file G E N I U S
@DavinderEvolution
@DavinderEvolution 3 жыл бұрын
bruh wth
@noobspanker6485
@noobspanker6485 5 жыл бұрын
NICE
@themartyr2649
@themartyr2649 6 жыл бұрын
Could i create a script to automatically create a wine environment and edit the path variables, to automatically clone something from gitgub and to automatically install python
@impactgaming5717
@impactgaming5717 3 жыл бұрын
Present sir
@setvang94
@setvang94 8 жыл бұрын
are you using any special colorscheme for your vim?
@DigitalMetal
@DigitalMetal 8 жыл бұрын
+Duc Hieu Nguyen My vim setup is the vimrc from the grml project. git.grml.org/f/grml-etc-core/etc/vim/vimrc Hope that helps
@setvang94
@setvang94 8 жыл бұрын
yes, thank you
@sakthidbtechchennai2634
@sakthidbtechchennai2634 3 жыл бұрын
SHELL SCRIPTS - www.sakthidbtechnology.com/blog_shell_script.php For more details kindly visit this blogs.
@MohitSharma-up1yo
@MohitSharma-up1yo 2 жыл бұрын
can anyone share the exact steps ko connect oracle DB using shell script
@ItzCroown
@ItzCroown 2 ай бұрын
Can i contact you somewhere? I need help with my bricked TAB, im lost and i don´t know how to fix it..
@pravingaddam8541
@pravingaddam8541 2 жыл бұрын
Hi My shell script scenario:- It check bill_status for previous month from Bill_status table . Bill_status table contain status column with unique value i.e. ( C for completed and Other than C for not completed). My expectation:- (my script need to run daily till status=C , if we get Status=C then no need to run for remaining day of this month. And start again same script with next month 1st day to till status=C) Example: --- If I found status other than C then this script will need to run daily till we get status C . And If i found status C today i.e. 23/Apr/22 then it would not check status for remaining day of this month. It should Start again with next month first day to till status=C and so on . Kindly provide suggestion or logic for above expectation
@germanshepherd-simba6177
@germanshepherd-simba6177 4 жыл бұрын
How to save the file and execute after editing with vim command
@ricksmainacc1004
@ricksmainacc1004 4 жыл бұрын
i dont know i asked the same question lol
@robert-janvanloon1227
@robert-janvanloon1227 3 жыл бұрын
use literally everything else. Vim is shit
@misha2000
@misha2000 3 жыл бұрын
You can save the file in vim by typing :wq at the end of the screen..it will save and exit from the vi editor..and for execution you simply type sh and file name
@sajidhussain-sl5mx
@sajidhussain-sl5mx 2 жыл бұрын
@@misha2000 thank you
@vaibhavkt8765
@vaibhavkt8765 4 жыл бұрын
It works even without the chmod command. What is the use of the chmod command?
@prassuseshu7916
@prassuseshu7916 3 жыл бұрын
Change permissions on files
@bob-ny6kn
@bob-ny6kn 4 жыл бұрын
Ahem… Hello, World! :)
@roguefox4308
@roguefox4308 7 жыл бұрын
1st, thank you for this quick tut on scripting!!! I am trying to learn how to make a script to do some rather complex things for a class. And this really helped get me in the door. 2nd, I think this video helped me enough to write the code. However, I would like to know a bit more. Like what chmod +x [FILENAME] actually does. 3rd, if I'm looking to write a code that will have different methods, will I be able to write the code in the same way I would a python file that uses a console or a java file that uses a console or gui? (looking to run methods in a code)
@Samir-wp4ek
@Samir-wp4ek 7 жыл бұрын
the "chmod +x " make that script executable
@weltmeister
@weltmeister 3 жыл бұрын
RIP your return button
@atifatabassum2309
@atifatabassum2309 3 жыл бұрын
Which app is this ?
@DigitalMetal
@DigitalMetal 3 жыл бұрын
Not really sure what you're asking. Are you referring to the shell, terminal, or text editor. I'm going to guess it's either the shell or text editor. The shell in the video is a BASH shell, although the things we go over in the video should work on most, if not all, Unix shells. The text editor is VIM.
@redpilledpatriot6868
@redpilledpatriot6868 5 жыл бұрын
what are you using? becuase it certainly isnt kali linux. see. >>> root@kali:~# tmp$ echo "Hello World" bash: /tmp$: no such file or directory
@JarppaGuru
@JarppaGuru 2 жыл бұрын
is this going to be hack my neightbour wifi password becouse its so easy and designed so you can LOL password that you not do anything you just get slow internet. everything in today is blocked there is no shares that you can read LOL
@infreezydark
@infreezydark 5 жыл бұрын
Can u do that with python
@infreezydark
@infreezydark 5 жыл бұрын
@@legobatman2440 oh yeah yeah i get it
@Mr.scarecrow1
@Mr.scarecrow1 Жыл бұрын
Some say this guy is still listing Text editors . Ffs
@zakorkaz
@zakorkaz 7 жыл бұрын
Was wondering if I could start a new hobby of learning how to write code......daydreamed through this whole tutorial. Thanks for the good info but totally not for me.
@navjotsingh2251
@navjotsingh2251 6 жыл бұрын
BowHunter77 most people who say they want to learn coding expect it to just stick. Ima tell you the truth it’s not going to stick in your head straight away and you are going to have moments where it just flies over your head and you don’t know what the heck is going in. That’s how I started off. Now I’ve been coding for over a year and I feel more proficient and professional and I’m suprised I remember most of it.
@modesto885
@modesto885 4 жыл бұрын
Dude, can you fucking hit your enter button any harder???? lmfao!!
@HugeAndre3000
@HugeAndre3000 3 жыл бұрын
You go way too fast with minimum explanation
@mahendrakoshti1715
@mahendrakoshti1715 3 жыл бұрын
Present sir
User Input Linux Shell Script Tutorial
2:24
Kris Occhipinti
Рет қаралды 8 М.
A Beginner's Introduction to BASH Shell Scripting
44:24
Joe Collins
Рет қаралды 288 М.
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 57 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 62 МЛН
Write Your Own Bash Scripts for Automation [Tutorial]
16:35
Null Byte
Рет қаралды 753 М.
60 Linux Commands you NEED to know (in 10 minutes)
10:50
NetworkChuck
Рет қаралды 1,4 МЛН
this BASH script will make you a MILLIONAIRE
19:20
NetworkChuck
Рет қаралды 707 М.
The Confusion With Linux Shells
12:19
DistroTube
Рет қаралды 12 М.
Shell Basics   Writing a Shell Script   Linux Tutorial 5
15:22
Kris Occhipinti
Рет қаралды 115 М.
Become a shell wizard in ~12 mins
12:25
CODE IS EVERYTHING
Рет қаралды 230 М.
Simulating the Evolution of Rock, Paper, Scissors
15:00
Primer
Рет қаралды 477 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4 МЛН
Look at two different videos 😁 @karina-kola
0:12
Andrey Grechka
Рет қаралды 10 МЛН
Does size matter? BEACH EDITION
0:32
Mini Katana
Рет қаралды 17 МЛН
Они придумали бесконечные деньги
0:53
Бесполезные Новости
Рет қаралды 2,8 МЛН
Maa Bahar Kuch To Hai 😱🙄 | mistihappylifestyle #shorts #viral #halloween #trending #shortviral
0:41
Misti Happy Lifestyle Games & Shorts
Рет қаралды 10 МЛН
ПРОСТОЙ ТОРТИК
0:17
KINO KAIF
Рет қаралды 3 МЛН
Почаще проводите время с Родителями 🥺❤️
0:51
Dragon Нургелды 🐉
Рет қаралды 671 М.