Writing a Shell Script - Tutorial filmsbykris.com / metalx1000 For help: filmsbykris.com... FaceBook: / 225113590836253
Пікірлер: 145
@trope58411 жыл бұрын
Like fine wine you are getting better with time kudos
@DontEatTheReaper11 жыл бұрын
I definitely would like more basics videos. These have been great. As a beginner, I appreciate something like this learning format, instead of just looking up random info pages.
@user-gw2qn1yd6u10 жыл бұрын
Very detailed, helpful for us beginners
@Cameron924200811 жыл бұрын
I got in a little on this series but as usual i am not disappointed. Please continue as this is a fascinating subject,
@Cilmaen11 жыл бұрын
Absolutely brilliant sir. Thank you for taking the time to share. More please.
@DoodahGurl11 жыл бұрын
Really enjoyed how all the prior tutorials are now coming together. You're awesome, Kris! Have a Nice Day! LOL
@kulbhushansharma58323 жыл бұрын
informative channel with lot of basic information how to use linux and shell .... Thank to you Sir... appreciate your teaching skills too.
@takwiannoh67126 жыл бұрын
Wow! This is what i really want to see on you tube. Thank you for that because now can write a basic script . Thanks to you.
@takwiannoh67126 жыл бұрын
I need more please
@quirosvillalobos29747 жыл бұрын
I think that the shell script video by Kris Occhipinti was very good. I could use more "basic material" as I am new to this field/area. I am trying to learn Linux. Thanks, Quiros
@dodo377311 жыл бұрын
Probably worth mentioning for new people: if you don't enter your script with a .sh file extension then you probably won't have syntax highlighting (colors while you are scripting) because your editor won't know what to highlight as. Or you can go in and enter the "#!/bin/bash" and save, exit and go back in and it will be highlighted. I like the way you do tutorials and wish there was more stuff on python. Seems like a lot of programs on my system are python when I poke around.
@oleksaoleksa22167 жыл бұрын
Thank you! I have just started with Unix and there are a lot of people who need basics :)
@marccometa11210 жыл бұрын
The series of videos was great! Thanks Kris! ( that "wq" though at 9:10 mark then you giggled! Haha! I am a VIM user too ;) )
@MrMrcunny9 жыл бұрын
Thanks!! Great Instruction, I do not have nano. Pico looked identical , except for the text colors almost identical in behavior. it is nice to know that there is yet, another option besides Vim,and Emacs. I usually use vim, still getting down the mechanics. Emacs is a ways off yet. And to use bash made it even more achievable. This level of instruction had been "JUST" what I was looking for . Looking forward to them all. Thanks Again.
@DigitalMetal11 жыл бұрын
I will hit that in a few weeks when I do the next batch of Shell Script Basics Videos.
@onethirty13013010 жыл бұрын
Just starting shell basics, so far so good :-)
@lingabing11 жыл бұрын
Oh thank you so much! Your video was very easy to understand! I will be supporting and watching your videos to help me through class lol
@Toydeathray11 жыл бұрын
This is great! Im new to linux and scripting, thank you i wouldn't know what to do!
@Knuspertoni9 жыл бұрын
Thanks Kris! Your posts are just the right thing to step into bash-scripting. The new videos are so much better than the old ones... One question: if one does not know about all parameters of a bash function ( e.g. you often use -n or -e for the "echo" function). Is there an easy way to list all parameters of a function in the bash?
@merajkhalidkhan8 жыл бұрын
Thank you Kris. Great tutorial on shell script.
@Perciwell4 жыл бұрын
I'm not sure if you like to make a video about this subject. I'm not a beginner, but I'm struggling to understand all the stuff concerning variables in Linux. The differences between local variables, environment variables and shell variables. It becomes not more clear when a good and competent author writes environment variables are sometimes also referred as "shell variables". At this point of reading I have felt a little bit despaired. *There are several questions, if I hear or read something about variables. E.g.:* - Ok, local variables, but local to what? In some programming languages there are also variables which are local to a single function in a script or even local to a code block or loop or if clause. - Ok, environment variables. They seem to be something like nearly global variables, because they are known by any child process of the shell (Or script?) in which they were defined. - Ok, shell variables. Which shell is meant? The current bash session? Or the login shell as something like the grandfather of the current running shell? At which point will they be defined. I'm currently not totally sure. And what the heck is the difference between the output of set and env? Can env be used to set or delete variables? Or can set used in this way? I will get the hang of it - sooner or later. Anyway. Thanks for your videos! :-)
@PawanKumar-hf3dh10 жыл бұрын
Thank you very much ..... Thanks to you I wrote my first script Buddha bless you
@DigitalMetal10 жыл бұрын
No Problem. :)
@DigitalMetal11 жыл бұрын
Yeah, I need to work on my Python. I love Python, but currently I'm learning Java and C, and I'm trying to get better at JavaScript. Lot on my plat right now. But, that just means new things for tutorials in the future :)
@danqingchen52254 жыл бұрын
it will be really great if you can do more tutorials on shell script thanks in advance
@alanjaf987911 ай бұрын
Thank you for been so easy to understand. God bless
@DigitalMetal10 ай бұрын
You are so welcome
@DOLUSXXX10 жыл бұрын
Excellent lesson teacher!
@DigitalMetal11 жыл бұрын
I would, if I really knew more. I mean, they are all similar. They would be used for the same things, but some syntax would be different. I've mostly used BASH. I've been using zsh for a few months, ever since I tried GRML (if you haven't tried GRML, you should check it out). Mainly zsh is just super awesome at auto completion and a few other things. And, the only time I've used sh is on really stripped down systems (mostly devices that run linux. Phones, routers, etc) but I'll look into it.
@dodo377311 жыл бұрын
Sine most of my other system applications are written in c I would be happy to see more tutorials on that as well. Especially compiling and inserting custom built modules (something I am hacking on now (macchanger issues with eth0 driver bleh)).
@HigherPlanes11 жыл бұрын
I do the random word capitalization too lol! Glad I'm not alone.
@DigitalMetal11 жыл бұрын
I'll put it in my list. And there are a number of ways. But for now give /etc/rc.local a look over.
@centaur.360310 жыл бұрын
very helpful, Krish! thanks a lot!
@peymanyeganeh996 Жыл бұрын
thanks buddy it was helpful
@mohammedalshehri12357 жыл бұрын
Man, you are doing great job. I am so thankfull to you. Could please tell me where can I find more videos for you on basic lessons. I also wanna ask you if you have a tutorial on Linux Programming Interface. Thank you a gain Millions Thumps Up,
@mohammedalshehri12357 жыл бұрын
I got the basic staff Kris.
@cambotandclay9 жыл бұрын
I really like these vids. I hope you do more. Especially since it's not juut lines in the prompt. I want to learn to use BASH (or any linux shell) to automate things. To help me learn everything I can do with it rather than simply use directories, etc. I have a whole bunch of programming stuff I want to learn and shell useage and automation is very essential IMO. I want to run scripts from programming languages I learn. (By the way, if I nano #!/bin/python will that run a python script or do I need to setup/import a python interpreter?)
@ShantanuJain00710 жыл бұрын
HI Kris, Please continue with intermediate stuff.
@haranadhprathipati63288 жыл бұрын
hello sir super videos,i want more videos how to move
@shahrukhrahmankhan78606 жыл бұрын
THANKS FRIEND! SCRIPT WORKS FOR ME...
@kennethhowell52919 жыл бұрын
Thank you very much! you are a lifesaver!
@lekhapora353510 жыл бұрын
great this tutorial helped me thanks once again
@JD-hx2dp8 жыл бұрын
Great tutorials!!! Thanks
@xingkitty238 жыл бұрын
Very helpful. Thanks!
@Mapleaph10 жыл бұрын
very good, Thank you very much!
@XwyxX9 жыл бұрын
nice short easy understand and funny awesome :)
@ecreeth9 жыл бұрын
Gracias por tu aporto amigo!
@spschoolpluscafe10 жыл бұрын
great video, but please upload the rest of the videos. thanks.
@DigitalMetal10 жыл бұрын
Rest what videos? I have almost 1,600 video and I upload new ones every week. Have you really watched them all?
@GreenHornLinux11 жыл бұрын
Great video, thanks for sharing!
@Eric885337 жыл бұрын
Hi Kris love your vids. Can you give more different examples on this topic? and can you include as well variables, loops and conditionals. thanks, appreciate it. ps. I am new in linux ))
@DigitalMetal7 жыл бұрын
I have hundreds of videos on Shell scripts put into different playlists and I go over all those topics. My latest playlist is here: kzbin.info/aero/PLcUid3OP_4OV46dBG6R2AvV_-QyB61WRH Although you can always search through all of my videos on my website: filmsbykris.com
@FlorianSchauer11 жыл бұрын
Good Video
@MAKE_MONEY_BY_FREELANCING10 жыл бұрын
Good one..
@DigitalMetal10 жыл бұрын
Thank you
@josephdaniel199910 жыл бұрын
Thank you! Helped a lot ^_^ You got a sub :D
@DigitalMetal10 жыл бұрын
no problem
@josephdaniel199910 жыл бұрын
Kris Occhipinti I was wondering if you did a video on "chown" and "chmod". Thanks!
@HollywoodUndeadV8 жыл бұрын
thank you Sir !
@adityasinghverma47658 жыл бұрын
Amazing! Thankyou! :)
@DivyanshSinghK7 жыл бұрын
Excellent
@puppy_BYTE3 жыл бұрын
very informative, how is echo different then echo -n ?
@shivesh10510 жыл бұрын
Thanks!! a ton...
@SudeeptoDutta11 жыл бұрын
At 13:14 why there are two lines instead of just one ?? I only got "James favorite color is Red."
@shilinjiang5897 жыл бұрын
very helpful!
@harrysingh27428 жыл бұрын
Hi Kris, great video series. Question - why are semicolons missing in the script?
@DigitalMetal8 жыл бұрын
+Harry Singh Which semicolons are you referring to?
@harrysingh27428 жыл бұрын
Kris Occhipinti the ones you put after each echo in earlier videos..
@DigitalMetal8 жыл бұрын
Harry Singh Do you mean this video? kzbin.info/www/bejne/n3qxlZSfot6JmtU If so, the semicolons in that video are to separate commands that are on the same line. Here I've placed the commands on separate lines, so there is no need for semicolons. Normally in scripts you will put separate command on their own lines to keep things organized and easy to read. You can still put semicolons at the end of each command, but there is no need to do that (in shell scripts). If that is not the video you are talking about, and you are referring to some other semicolons, please let me know.
@harrysingh27428 жыл бұрын
+Kris Occhipinti Yeah, it's the same video I was talking about.. got it, if you put two commands in one line without semicolon it won't work, both in shell as well as the script, but a new line character without semicolon seems to do the trick.. can you shed some light on that?
@DigitalMetal8 жыл бұрын
Harry Singh There isn't much more light to shed. It's pretty much what you just said. New commands are indicated by either semicolon or a newline.
@galaxxy0911 жыл бұрын
sweet! more tutorials! :D
@mathewrockz4410 жыл бұрын
you are great :)
@spschoolpluscafe10 жыл бұрын
I mean videos on shell basics. I have watched up to only tutorial 5. do you have tutorial 6 and beyond on Writing a Shell Script Linux?
@DigitalMetal10 жыл бұрын
Well, there is an annotation in the video that will bring you to a playlist with about 30 videos in it. But, I have a few hundred videos on the topic Shell Scripts/BASH on my KZbin channel. All you have to do is look there: kzbin.info
@lifeisworth38388 жыл бұрын
love ur videos. really really gud buddy. May God the Almighty rewards u for ur work. got a question though i did the way u described nd it worked out well except attributing it to another file. it looks that way: echo "$name" >> indtroduction.log
@DigitalMetal8 жыл бұрын
+lifeisworth by attributing do you mean appending? Your code looks correct. What is the problem you are having? It is working, just not in the way you thought it would, or is it not working at all? Are you getting an error? I can't help you if I don't know what they problem is.
@lifeisworth38388 жыл бұрын
yeah yeah, dats what i mean. the file isnt being shown in the directory when i ls dats mean i dosnt exist, so there is no way to open it. Btw, many many thnx for rapid reply :)
@DigitalMetal8 жыл бұрын
lifeisworth Well, what you typed here look correct. It should be creating a file. Only things I can think of is that either you are typing it different or you don't have permission to right to the folder you are in. Either way, I would think you would be getting an error of some sort. Could you take a screen shot and of what you are doing and send me a link to it?
@lifeisworth38388 жыл бұрын
thnkuuuuu it worked dont know what the mistake was, but it works now :))))
@rusher727twins10 жыл бұрын
Hi. How to write shell script of FCFS/FIFO algorithm in Linux? Can you please show me the shell script? Thank you...
@vnsmur318 жыл бұрын
Great videos!! How do I delete scripts? I made a few in the vi editor and I am trying to figure out what command I need to use to remove these. Thanks!
@DigitalMetal8 жыл бұрын
+Nessa M You would delete them like any other file. In the shell that would be the 'rm' command. so something like this: rm myscript.sh
@vnsmur318 жыл бұрын
+Kris Occhipinti thank you for your reply!
@vnsmur318 жыл бұрын
+Nessa M I am trying to figure out why I can't locate my etc/inittab file. I am trying to view the file that contains the default runlevel to boot when I initialize my Linux system at system startup. When I type the "cat /etc/inittab," it states that it does not exist. Is there another way for me to be able to view this? Or do you have a video that I can look at for this? I use Ubuntu Linux 14.04. Thanks!
@DigitalMetal8 жыл бұрын
Nessa M Yes, I believe all this has changed with systemd, which most systems have gone to, and people fight about all the time. I haven't played with the new setup yet.
@vnsmur318 жыл бұрын
+Kris Occhipinti Thanks! I am needing some help and was wondering if you could help! I created a directory and named it project11 inside my home directory. Now I'm being asked to copy a file named "profile" to the profile11 directory by typing cp /etc/profile ~ project11/profileCopy. My question is do I first need to make a file named "profile" and then make a copy of that file "profile" to profileCopy in order for that command "cp /etc/profile ~ project11/profileCopy" to work? I will be using this to compress and decompress. If you can assist or if you have a video that would be great! Thanks
@robertpendergast26207 жыл бұрын
Have you mentioned how to run a script at startup of the computer? I know && goes somewhere.
@DigitalMetal7 жыл бұрын
Lost of ways of doing this for different scenerios. Look into "/etc/init.d/rc.local" and "/etc/rc.local" Hope that helps.
@robertpendergast26207 жыл бұрын
thanks
@jeanrodrigues62492 жыл бұрын
Brian
@__donez__11 жыл бұрын
Links in the description?
@jasonberg150910 жыл бұрын
No description available
@DigitalMetal10 жыл бұрын
Added
@ReginaRiveroll7 жыл бұрын
Hola how can u use the command grep if you have a Number like 123,45 but you want to erase de coma
@jasomtodokazal6 жыл бұрын
babyitsgold In order to remove characters you can use sed command. Here's the example: echo "1245,378" | sed 's/,//g' 1245378 It just shows the result this way, but if you have a file with numbers in such format and need to save its modified version to a file, it goes like this: cat numbers.txt 123,724 783,5368 123,023 sed 's/,//g' numbers.txt > nocomma.txt && cat nocomma.txt 123724 7835368 123023
@bombomsilva81797 жыл бұрын
every 3 months i do update on my plexmedia server and my path is ( cd /usr/local /src/filename) i wouldlike to go fast by using bash exemplo --( #!/bin/bash /usr/local/src)-- got it
@DigitalMetal7 жыл бұрын
No I don't get it. Sorry, I don't know what you're talking about.
@bombomsilva81797 жыл бұрын
simple example , to me update my plexmedia server i must go into cd /usr/local/src/ what i want to create is a bash plex.sh with value of cd /usr/local/src/ , is that possible?
@DigitalMetal7 жыл бұрын
bombomsilva Is there a reason you are putting your program in /usr/local/src/ ? It really should be in /usr/local/bin/ . Which should be in your $PATH already, if not I would add it to your $PATH. That is if I understand you correctly. Or are you just asking me if you can put "cd /usr/local/src/" in a script? If so, yes you can.
@MoonberryJam939 жыл бұрын
What program are you using?
@joseiahsewwandi6 жыл бұрын
could you explain to me this
@OddBallTrails6 жыл бұрын
I spell it like "Colour".
@deeptravel57337 жыл бұрын
Hi once i execute the command ./myscript.sh it says permission denied.
@mr_karamazov2467 жыл бұрын
Try using root.
@tyurikfefry33796 жыл бұрын
Sorry,What is Version/Types of Linux? Someone Help >3
@bombomsilva81797 жыл бұрын
can you make a vedio using bash with (/usr/local/src)
@DigitalMetal7 жыл бұрын
I'm not really sure what you are asking me. /usr/local/src is a folder on your computer, which should be empty by default. It's a place where you can put your source code for locally compiled software. Since I don't know what programs source code you put in there, I couldn't tell you how to use it as it would very from program to program. Also, I wouldn't know what you mean by using it with BASH. BASH is a shell interface/interpreter. I suppose you could put BASH code in that folder (it's your computer, you can put whatever you want in it), but since BASH code isn't compiled, you would normally put it directly in the path it's going to be run from. A common place for system wide programs you create yourself would be '/usr/local/bin'
@lifeisworth38388 жыл бұрын
isnt there no Tutrorial 6 of these series ? :( :( :( :(
@DigitalMetal8 жыл бұрын
+lifeisworth Actually, there are 29 videos in this series. The easiest way to play thought them all is to use the Playlist for this series. It's the one I talk about in the video where are suggest using the annotation to watch the full playlist 14:46 You can also use this link. kzbin.info/aero/PLcUid3OP_4OXOUqYTDGjq-iEwtBf-3l2E At this point it looks like I might be doing a new Shell script series starting in January. Over all I have about 400 videos on Shell Scripts that are broken down into different playlists (earlier videos might not be the best quality. You can find all my videos and playlists on my KZbin Channel kzbin.info You can also check out my website to search thought videos: filmsbykris.com/
@lifeisworth38388 жыл бұрын
thnkuuuu veryyyyy muchhhhh. will definitely go thourgh all of ur videos.
@jeanrodrigues62492 жыл бұрын
Tim
@Mirecsooor8 жыл бұрын
this video is great, I just don't uderstand one thing... I want to create a shell script that terminates all processes of a name given to the shell script as an argument, I have done something like this: #!/bin/bash ./app1 & PID=$! # ... kill $PID
@DigitalMetal8 жыл бұрын
+Mirec Barborka Have you tried just using the 'killall' command? If you need to kill a number of processes with different names you can try this: pastebin.com/32z74eGr If you want to make sure the process is dead you can add the '-9' after 'killall' in the loop.
@Mirecsooor8 жыл бұрын
+Kris Occhipinti killall command works fine, i want to try through script to understand bash shell scripting, but doesn't work... i have triied second line like this: ./killall ''$1'' but doesn't work ... :( have you got an idea ?
@muhammadfarankhan34587 жыл бұрын
can you also provide your video about finding a file where we only know file name but not its location.
@DigitalMetal7 жыл бұрын
find / -iname "file.name" Hope that helps.
@muhammadfarankhan34587 жыл бұрын
thanks for your reply. Can you give me an example of how to use this command if i want find a file named "startWeblogic.sh"
@DigitalMetal7 жыл бұрын
Muhammad Faran Khan Same example I gave you in the last post. If you are having trouble with this let me know what errors you're getting. find / -iname "startWeblogic.sh"
@muhammadfarankhan34587 жыл бұрын
ok thanks a lot buddy i got it right and executed successfully ....
@muhammadfarankhan34587 жыл бұрын
can you help me out in how to use "find" command for finding files that meet the specified criteria and then remove them. And how can i make the file in which i run this "find" command execute automatically after two days periodically. Kindly reply as soon as possible
@tingtingjoanaling21146 жыл бұрын
how to terminated shell script comment?
@vickygarg39673 жыл бұрын
Sir I need help to make a script for cloud mining for crypto currency,I sure u also will something from me