I’ve watched a lot of technical training videos with 20 years in the industry. You do a great job explaining things included with real live demos! Thank you for sharing what you do! Helping others learn too. 🙌🏼
I shortened that alias and implemented it into all my servers immediately (in my home) because it is simple and brilliant. I know them anyway because they are static, but I love the simplicity of it.
You didn’t need the `echo $(`…`)` at the end, you just needed to escape the `$` so it doesn’t get expanded in the string: `alias ipaddress="ifconfig | grep broadcast | awk '{print \$2}'"`.
Fortunately for the civilized jq users among us, there is now “ip -json addr show | jq …” No more ifconfig (I guess? Honestly I never got the ip tools memo, so this has been very confusing for me)
Nice bash intro. Half the battle when writing bash is knowing which command and arguments (flags) to pass to it; # hostname -I Returns the system primary IP address. Type hostname --help for details. Of course, I understand the exercise was to demonstrate pipping capabilities of bash. But the less pipping the faster your script will run. Also, this is much better than without the curly brackets. # echo "${STRING}" Excellent job.
@@charlesmagno28I got the same situation. For example - it really helps handle server apps, particularly deploy updates (or configs, patches), do system tasks
@@dawidsadzak8137 True. I've seen a few. But it was a nice coincidence to watch this video today. I know how the world works, still, i think it's a great short video about things you can do with bash scripting.
Great video. Exactly what a bash nab (me) needs to start up, see how to make a basic one then build on it, then add more and more and bit of polish ... brilliant.
Intermediate Tip: Use "man bash" to learn the semantic differences of: "&" (ampersand), "&&" (double ampersand), "|" (bar), and ";" (semi-colon). Most of my aliased commands use these punctuations, with one being "firefox & discord &" and another being "git fetch ; git status ;". GL, HF
I love your videos, can't thank you enough for what you do out here, and thanks for taking the time to "give us" this knowledge. Keep. Up the good work!
In the case of shebang, it's better to use `/usr/bin/env bash` instead of the exact shell location so it can be ram on different machines without changing a single line.
thats neat and smart tip, if i was to write malware on my linux machine and wanted to transfer to a remote machine somewhere else that might be using different shell. It could in cases like that then
Thanks a lot, this is very well explained. It is the best explanation I have come across unlike many scripting/programming videos where the narrator often spends a lot of time even hours talking to themselves in vain because they are so badly explained.
Thanks for sharing. A minor correction, re 2:17 - the .sh extension is not actually necessary. And just a note re 12:55, while some folks do call those "curly brackets", a less-confusing name for them would be "braces" -- { and } -- whereas "brackets" (or "square brackets") would be [ and ].
Bash was my entry point into coding! I just wanted to save time on repetitive tasks and chill more while at work; upside was that I learned I could annoy my supervisor by being such a TryHard.
@@justinc4782 it depends where you want to go, to have a cushiony job with few working hours, then just quietly do your part. If you want to be more successful and have a job that recognizes this effort, then ask for more work.
I was going to comment to bash you for using nano but then I realized that I started doing anything on the *nix command line using nano instead of vi so I can't really say stuff; but vi is the best thing to learn.
It's fascinating that Mr. Kinzie explains that you need a "Ubuntu or Kali Linux system, really any Linux system" and then proceeds to create and run bash scripts on a macOS machine without mentioning that macOS does bash as well.
@@dnyaneshwariulhe2224 VSCode is a better editor IMHO but may be more complicated and sometimes simpler is better. Not sure why you're having trouble getting VSCode to work with his examples. I did just try the first script he typed in using VSCode instead of nano, and it works just fine.
Good habits put in a "header" with the date, your name and purpose of the script. Also keep upper case vars for env vars. ^^^ being kind to your future self
@Learn Linux im starting to get the idea actually , my issue is the way i learn , unlike most people i need the bigger picture first , then the break down , not the other way around , sooo ya lol
I wouldn’t recommend using aliases like that. Make them little scripts. Aliases are part of bash expansion. Using grep with your alias… womp womp. Gotta single tick it. Aliases for obscure references. Scripts for other stuff, not piped commands.
Actually to find out the shell you are currently using you need to execute which $SHELL since most of the time you want your current shell to interpret your script
Here’s what I’d like, Press the on button, boots to the login in screen. Computer says: who’s there? I answer with my name, Booting finishes, logged in.
boot it into a tty by configuring grub. make your terminal run your little program when it loads use espeak to say "whos there" use the read command to ask for your name and get input, if, else, string contains to check for proper input, then boot into your graphical interface
Remember: **Syntax is your wand**, and every bug is a riddle waiting to be solved. May your journey be filled with wonder and your code compile without tantrums.
alright, this is more like it. let's be real, a lot of n00bs need to be learning stuff like this and not be so concerned about being the next best h4x0r. Good job Null Byte. /usr/share/thumbs.up
hello . 0:40 It's get my attention that black blanket on the wall. The blanket surface is like the equipment on the voice lab to eliminate external sound effect. Am I right?
Cool video- There is a lot of content like this on youtube but your style makes this easy to ingest for beginners. Couple if things though- You don't have to have .sh at the end of it and it you're going to run it with `bash ` you don't need the shebang either. Also, why did you have to fuzz the ifconfig command? I hope you continue this series- bash offers some much more advanced capabilities.
It doesn't stay or save to the system, another words I set it up to watch my cpu temps, " watch -n 2 sensors" which I run whenever my pc is on, so I wanted to type "tmp" it does work but when I open a new terminal it doesn't, so really what is the point, I understand that I'm just learning bash script, so this is a Question, not a sarcastic remark. What I really want to learn is how to have bash scripts run on start up, thanks for the video
a bit confused @8:53 with "read name". If name isn't defined as a variable yet, how is it reading it as the only reference to "name" previously is in the string?
From man bash: For almost every purpose, aliases are superseded by shell functions. So no, aliases are not cool (apart maybe for just one command, but it gets crazy when you want to put more than one command with quotes; and also they can't handle arguments). Functions are cool!
People see the result of your ifconfig, what will be the consequence of it? As long as it does not contain any public ip information, those results mean nothing to anyone right?
Really didn't like the fact the second example was not finished after you ran in to the error. I have copied everything after you corrected it with "fi" and still getting error "line 4 [Tom]: Command not found"
Use bash, sh, perl etc ONLY in cases when you don’t pass arguments to the script and there is no any “if” like statements instead of checks for a command return code. You will be happy and other people who will work with your code base - too.
Sir i want a program or software that when i enter 'enter' button on keyboard that automatically enter tab 2 times & enter 2 in monitor can u plz help mee
Hi , I am in SOUTH AFRICA and I want to purchase your Linux course. I am getting an error "State must be filled" . I've used google account to log in. Solution?
I've been searching for a tutorial to make my terminal look like this, old green monitor, for a long time. Do you have any tutorial for that? I'm a complete newbie here in Brazil, learning Linux and Terminal prior to learn coding itself. Thanks for the video.
like the lgos stickers on laptop,any chance you can show us how to getinto v bullitin forums with out wireshark and being logged in...or how to get Ip from same boards not for spamming ...... the forums have some high end elite deepstate players ones a NATO person.
Writing scripts with nano? Really? Not that I want to start an editor war, but newcomers have the right to learn the beauty of vi, vim and it's derivatives. It takes 5 minutes to learn vi (and some time to master it). Best regards 👍
I think I have very primitive question but I couldn't find the answer until now. The question is I have files created via pipeline in gitlab. I can see them with git bash command like ls but when I click on that directory the files are not there. How can I make those files visible on browser in gitlab?