The amount of info he squeezed in this short amount time is staggering. These tips will save you countless hours. His accent is rough but English captions work well. Got a beautiful terminal now with loads of nifty tools after a day of intense googling
It's good to mention that 'cat' is a command that concatenates files that are specified in the arguments, but also when no arguments are passed it takes STDIN as the (sole) "input file". By mixing examples between Lecture 1 and 2 where both use cases are shown, students may be confused about the role of process substitution "
Thank you for making these videos available. These really do help expose all the critical loose ends of computer science. I’ve been lucky to have some professor who quickly went over a tool or two but never a dedicated lecture on the basics in and out.
Wow, I thought I knew the shell quite well, but clearly there's still so much more to learn. This is a great lecture, even if the instructor can be a little tough to understand at times (although the captions are pretty well spot on so that helps).
This was a really incredible presentation. It took me twice as long or more, because I had to keep pausing it, thinking about what he said, and reviewing to understand the wording/s. It'd have been nice if he would have paused, said it clearly in some places, and then began a new topic. But, I wish it'd be a little more arranged, like a sequential presentation versus stream of consciousness. Yet, don't take what I said negative. I got more from this than sitting through a week of college lectures. Thanks for sharing these videos. I hope to find more like this from the MissingSemester. Also, let me add that I looked up EVERY SINGLE REFERENCE that he gave to other tools, read about them, and thought how they would be used. So, I just wish that I had a download of this presentation in (like) a PDF or Powerpoint, where it could useful to review later. But, I wasted 2 to 3 times as long to make all of the notes myself to make sure that I could remember it.
Glad you found it useful! FYI lectures notes are online with the examples and links to mentioned tools and concepts. missing.csail.mit.edu/2020/shell-tools
@@MissingSemester Again, I loved it. I learned so much from this guy. He did a really good job, but I just wished that I could walk-away with less effort than I did. If that makes sense. Because, honestly, I paused and reviewed every website that he suggested, and MAN OH MAN is there some good tools out there. New to Linux, but man, I see what I was missing from the world of Windows.
This is such an amazing series. Administrating Linux servers is one of my many responsibilities at my job, but I have been stuck for quite a while now on my existing workflows and commands I know. This opened my eyes for many techniques and commands I did not know about.
Oh, I definitely appreciate that it's free! My purpose wasn't to just complain, but to let them know so they can adjust their content in the future. If I'm not being effective at teaching something, I 'd like to know so I can adjust; and not waste my or the learner's time.
@Dat Nguyen There's nothing wrong with someone stating they're having a difficult time understanding the lecture; feedback isn't always positive. Everyone appreciates that they're providing free lectures, but without honest feedback, how can they improve?
@@thechronic4twenty I don't see the need to insult me. Nothing I have said has been rude like your statement. Please understand that even those who accomplish great things also have room for improvement. My intention here is not to hurt anyone's feelings.
Thanks for the tips on the subtitles. I thought only auto generated would be available but happy it's the real deal there. I really didn't want to miss out on all the cool information. Took me far too long to realise what 'bass' and 'cell' were meant to be and that it's actually 'command' and not 'comment' that he is saying. Great teacher, just added an extra layer of confusion with some of the pronunciations.
What keyboard shortcut are they using to preview the expanded command? For instance how does he visualize "touch foo1 foo2" after typing "touch foo{1,2}"?
I'm rather new to Unix. I tried the commands (shellcheck, tldr, rg, fd) and none of them are on my system. I know that I can install them, but I don't understand the mindset that it is "OK" to blindly install packages on production servers. In the Windows world, I wouldn't even consider installing some unknown software (viruses, etc.). Why is it OK to install these utilities? Especially when it requires sudo to install (which again tells me it's something you should give serious thought to before doing).
Well Welcome to Unix. Everything is open source here. If there would've been issues, people would have reported and stopped using it. Moreover, you can always build the tools from the source just to be safe :D
Every lesson I've started was with the same complain, 'too much to learn'....... But becoms easier as I keep on trying .... Thanks for the great lesson .
Thanks for the reply! What I'm looking for is instructor's computer terminal setup file(zsh config - theme, plugins etc.). I couldn't find them in lecture notes.
They are linked at the bottom of the section I linked to. Look for the text "All of the class instructors have their dotfiles publicly accessible on GitHub: Anish, Jon, Jose."
Can you please tell me exact details about this setup? Zsh? Themes? Plugins? specially l liked the git plugin, command highlighting even inside man page there. Wow
Thanks a lot for sharing such a great series. I have learned many useful things from this lecture. I think the comments complaining about his speech are unfair.
I don't understand what the teacher does to expand what's in between the {}. For example, at 21:31, how is touch {foo bar}/{a..j} expended in all the variations foo/a... bar/j before he executes the command ?
It's probably a matter of his terminal, in that it shortens the paths. When he does cd .. he goes back to m/tools, meaning that the test directory was indeed created inside the m/tools directory. Cheers!
I think that he abbreviated his $(pwd) in .bashrc file like the one here check this unix.stackexchange.com/questions/381113/how-do-i-shorten-the-current-directory-path-shown-on-terminal check this too if you interested, he showed how to customize your own terminal and how you can use other peoples dotfiles ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-c5RZWDLqifA.html
Yes, it's worth it. Bash relies on the standalone utilities (like ls, cat, and so on) to a much greater extent than Python ever would, and it's actually designed to do so. Python replaces all that, usually with much slower alternatives. Python was also never intended to be used as a replacement for Bash/any other shell. An analogy would be if you were asking whether you should use a shopping cart or a truck. It depends on the task at hand. ;)
6:39 sudo !!, where the !! auto replace with previous command does not work on my bash, after i type !! and press enter, its execute previous command and output the result, it's only work on zsh?
You don't have a history file like .bash_history . Usually when you start bash and zsh for the first time it will ask you do you want it to setup this for you usually you will say yes.
You could try storing the path in a file with the marco-program and read it from the file(with it's absolute path) with the polo-program. If you don't know how to store and read variables from files with bash, read this: stackoverflow.com/questions/5965737/how-can-one-store-a-variable-in-a-file-using-bash
I'm guessing you came across similar problems as me, I know this is late, but this continues to be useful to people 3 years later, so, here goes nothing! I created marco and polo and they did exactly what I needed them to, except my directory wouldn't change back. That's when I realized what the difference between sourcing a script and the functions within meant. When you run a script, all the commands are followed properly but they are all executed in a brand new shell, and the shell is closed after execution. Thus creating a function and sourcing it into our current shell, and running them in our current shell will make them work. I know you're probably past this issue already, but to those who aren't, I hope this helps!
The series is fantastic - but I fear that after Lecture 1 the jump in difficulty here will put off a huge number of people. If you're struggling with this, move on to the following lectures, they are all much easier to follow.
Yeah, I hope so. This one was really STREAM OF CONSCIOUSNESS feel. Thought I was learned from James Joyce. But, yes, I did enjoy it and learn so much. I just wish that I could have had a little more arrangement, because I had to pause so much -- to look up what he was talking about ... because there were no screenshots nor references on screen. And, I couldn't really understand what he was saying exactly -- in some places.
Thanks a lot for providing your reassurance in this comment - I've been trying to follow along with the exercises at home, and I've been messing around for an hour, but that's only translated to five minutes in the video!
@@ConorJTobin Yeah, same with me, when I watched it first time, it took me long time to keep up with Speaker. Because, I actually tried and verified everything that he did.
This lecture requires time to be digested but its content is extremely valuable. When starting learning Linux and scripting the topic is so broad that you can easily get lost. This lecture is a solid list of things that can be used to start the journey. Thanks!
very nice series - big jump in difficulty from the first lecture, could have been a bit more progressive. Also it would be great if we could download some ample files to be able to replicate in real time
If you're on a Mac, some of the tools he mentioned (tldr, shellcheck, ripgrep, etc) aren't installed by default - easy to fix tho! While it may be possible to download and install them via a browser and the finder, please don't do that. Instead, instead install the homebrew package manager (brew.sh) and then use it to install all of your command line apps. ie I installed tldr with "brew install tldr". Even better, you can easily manage your installs with "brew list" or "brew uninstall".
For how clear, structured and beginner friendly parts one and then three are, this is really quite a poor followup. A great resource in its own right, but as part of a series it seem quite out of place. When Lecture 1 opens with explaining what a terminal is and how ls works, this is a heck of a jump. Using a customised zsh shell when teaching a bash lecture is a bit of a no to me too.
The lectures weren't meant for complete beginners. It is meant for people who have work with the shell before and wanted to deepen their understanding.
These lectures are not for beginners. It feels more like a compilation of things that you can learn, you know. You won't finish these playlist mastering version control nor shell scripting, but you will know that those tools exists, are quite handful and that if you follow the tips they gave, you can learn those things.
It makes me sad to admit, that I struggled to understand what he was saying and that he was making unnecessary references (such as the $-sign and its representation in other languages) here and there.
Great work! Thank you for making this content free! Since this is an introductory course I would have preferred he used simple bash and not zsh since I do not really get the difference, or teach us how to do it and make the terminal as pretty as his.
`-exec` runs the following command on each of the results of the `find` command, substituted at each `{}`. You need to tell bash where the end of the command is with a semicolon, but since semicolon has special meaning in bash, it needs to be escaped here as `\;`
im struggling to keep up but can infer most of what's taught from prior knowledge - this lecture needs more explanation of basic concepts. but i do appreciate the lecturer's efforts in the sheer amount of information provided: all those examples means he spent a lot of time putting the lecture together, but i think he's taking a bit too much of his own knowledge for granted ;)
At 16:55 in line 7 there is “$@“. In the resource file $@. In line 11 in the video there is “$?” in the condition, in the source code at the homepage only $?. I tried both ways, but the first 5 rows worked for me. I installed then ZSH and them changed the first row to #!/bin/zsh, but it didn’t help. No offense, but I found the first video easier to understand (the accent). It was well planned becoming step by step a bit more complex. The pace was better there as well. Here we suddenly jump into a lot of new commands, not testing them separately first. (I have Ubuntu 18.04.4 LTS)
I think that idea is very simple: each program has 2 output streams (may have more). The first one is stdout, which usually gives output on the screen, for example, echo "Hello" gives Hello. The second is stderr (standard error), the stream that says about execution is succeeded or not. If yes it gives 0, which means 0 errors, else gives 1. So simply echo "Hello" has 2 output streams. stdout is Hello, stderr is 0. The 2> /dev/null means redirect stderr to the /dev/null The > /dev/null means redirect stdout to the /dev/null
Initially, I was having a little difficulty understanding (because of different accent). However, I tried a little bit more and now I feel pretty comfortable :) Great job
I really like the lectures, thanks @missingsemester. Is there a way to find the solutions for the questions/homework in the lecture for comparing and guide if we are stuck?
Im traing use the commad for last argument as he said the $_ and it didnt work, i must store something as name of the file in any variable and then where I ware using command: cd $nameOfVariable, then it work well, but not as: cd $_ Hmmm, do I something wrong??
Ισίδωρος Τσαούσης He is not using BASH. He is using ZSH. You can install zsh and then use oh-my-zsh scripts to make it pretty as his. Zsh provides a lot more features than BASH to make your work easier.
Fantastic class. Although it's a little difficult for someone who is just starting with bash in my opinion. I was able follow along probably because I'm already familiar with many of the concepts that are explained. But the explanation is really awesome. It's definitely my go to reference of bash for now on. Congratulations MIT and thanks for opening this to the World.
Total beginner when it comes to bash scripting, but I had to figure out why his program was not working for me. I had to rewrite that if statement as if(("$?" != 0)) ; then #rest of the statement It took me a bit to figure this out but I can imagine some other students interested in learning shell scripting and then getting discouraged at this point :(..
it's history-substring-search plugin for Zsh. github.com/zsh-users/zsh-history-substring-search . Or if you install oh-my-zsh (ohmyz.sh/), it comes with this and many other plugins, themes etc for Zsh out of the box.
Great initiative and superb work by Anish, Jose, and Jon. Quick question though, is there a solutions page to the questions? Would be great if there was
Hi guys, how to understand 2> in the sentence "grep foobar "$file" > /dev/null 2> /dev/null". I tried many different ways in my shell, there is nothing special.
there are two streams, one is standard output and other is stderr, the regular output gets printed to the stdout and errors will be send to stderr stream. so 2> is for directing the stderr output to /dev/null which is like a black hole in linux. Still curious why 2> just replace the /dev/null to some file on you disk and see the ouput. **for more detailed comparison refer to this answer** stackoverflow.com/questions/3385201/confused-about-stdin-stdout-and-stderr#:~:text=If%20my%20understanding%20is%20correct,all%20the%20exceptions%20are%20entered.
I think he's using some sort of extension, I don't know which one but if you are interested in an good extension for python programming there's one called as "KITE AI" which auto completes the code for you, it supports editors like vim,vscode,pycharm etc
Awesome Lecture! The Instructor has good knowledge on the topic. People here are complaining about his accent. But its fine to me! The Amount of Knowledge shared in this short video is so amazing! Kudos to the instructor and @missingsemester to sharing these lectures to students who can't experience such quality of lectures! Heartly Thanks!