 So in my last video a few days ago, I showed you how to take a tar gzip file and embed it at the end of a shell script so that when you ran the shell script, it extracted what was inside that file. We did it in one line of code, but thanks to viewers and your comments, I learned something new. So the command we did inside the last script, isn't that, it is this, basically inside the script said it would look at itself, dollar sign zero, look for this line and delete everything in the line and in the file before it and then pipe the rest to tar gzip. Now it was very important when you did this that you didn't have any extra lines or spaces after this EOF file, the end of file. Well someone in the comments did inform me that if you actually use a zip file instead of a tar gzip file that I guess when you unzip zip files, they actually work from the bottom of the file back. So the spacing at the top is not that important. So we're just going to quickly look at that today. I am in a directory. I have one file in here. It is a zip file. If we do zip info on that file, you can see inside that file, there's a directory called data and inside that there is two images, fbk and tux png. So let's go ahead and create a script on these vim. You use whatever text editor you want. I'll just call it self unzip.sh and I will say that it is a bash file. So bin bash. And then what we will do is we will again, we can just put one line of code here with the next command after it. So what are we saying here? We're saying okay, the taller sign zero says the current file. So we're saying unzip. Look at the current file. The dash show just says overwrite if it's already been extracted. So the files already exist. You can choose whether you want that in there or not. So that will force override any files that may be inside the zip file. And then we're also going to pipe any errors to DevNol so we don't get any garbage output. And then after that, we will exit before we get to the rest of the script. Now again, in the last one, we used said to find a certain line and we had to make sure there was nothing passed out. We can have extra empty space at this because again, from what I was told by viewers is that zip files read from the bottom up. So when you run unzip on this file, it's going to look at the end of the file and work backwards and ignore the header stuff, which is great because I could actually just run unzip directly on this script, which is what the script does itself. Oops, knocking stuff over here. Okay, let's go ahead and save and quit out of that. Let's make it executable real quick. Change mod plus X self unzip. And then all we have to do is cat our data zip file into the end of our script. So now if I list out here, we have our zip file and we have our script file. And if I run our script file, and again, you can have the script do other things. You can have it display messages. You can have it once it extracts what's in the zip file, it can run executables from inside the zip file, whatever. But we're just going to extract. So I'm going to run that. I didn't write the script to give any output, but if we list now there is a data directory and if we list what's inside that directory, it is our two images. So that's a bit simpler than the tar GZ because you don't have to use any commands like said or to find a certain line in the file. You just tell unzip to unzip the current file. And again, it will read from the bottom up to the top. So it doesn't matter if you have any empty spaces or extra commands after your unzip command, it's just going to work. I thought I'd share that since a viewer brought this to my attention. I hope you find it useful. And as always, please, it films by Chris dot com. That's Chris the K. There's a link in the description. I also have a Patreon page and PayPal and LibrePay. Check out all those in the description of this video. And as always, I hope that you have a great day.