 Today, I'm going to show you some examples of some progress bars and shell scripts. You can find all these examples at my GitLab page, gitlab.com forward slash mail x1000. Just search for my project called bashell progress bars. Let's have a look at them. And then in the future videos, I'll go into more detail on how they work. So if I list out here my shell scripts from that project, I have four of them. The first two we're going to look at are PV. You may be familiar with PV. It's very commonly used in shell scripts, but I have two examples here. So when you're generating progress bars, you need to know what you're calculating. So if you want to give a percentage, you need to know what the total is before you calculate the percentage. But if you don't know the final destination, the final total, you can still give the user some sort of visual output. So here I have a script called PV dash no ETA. So it isn't going to give you an estimated time or percentage while it's going. It's just going to tell you how far along it is in numbers. So instead of giving you a percentage bar, it's going to have this little bar that moves back and forth. It's telling you how fast we're going, how long it's been going for, and how much we've moved. So if you don't know the total of what you're moving or calculating, you can still give the user some sort of visual idea that something is happening and how far along they are. Because sometimes calculating out what the total is can take a little bit of time. So you may not want to do that or maybe you just don't know what the total is. Here's another example with ETA. So here I'm actually going to be moving files. And so when I do this, I'm going to run it. It's going to be, say, it's moving this many files and it moved them and it gave you a progress bar up to 100%. So here it also is giving you the count. It's saying we moved this many files. There are ways to also get we're moving this many megabytes. Here we moved 174 files. It gave you progress. It only took two seconds. It wasn't very long. But you get the idea. Next we can be using dialogue. Dialogue allows you to have dialogues in your shell. It's a program that's probably already installed on many systems, but if not, you can easily install. And this is what it looks like. Here it's just, did a fine command to get the count because you need the total number of files. Then I calculated out the percentage and then as it went along, we added to that percentage. Finally if you are one of those people who must insist on having a GUI interface, Xenity is a great way to get simple dialogues and they allow for progress bars. So here we go. It's scanning files, basically running a fine command to count up a number of files. We get the total number of files and now we're able to give you a progress bar and a percentage there with that progress bar. Again, you'll notice, let me cancel that and run it again. It's taking a little while. It's scanning the files. That first three or four seconds there is calculating out how many files there are so that we can give this progress bar. That slows down your script. You may or may not want that. Do you really want to have this visual for that? It's up to you. It only took a few seconds there, but on a bigger project, it might take a while to calculate all that and now you're delaying your progress to get a progress bar. But progress bars do give the user some sort of visual idea that something is happening. So in the next couple of videos, we'll go over each of these scripts and see exactly how they work. I thank you for watching. Please visit filmsbychrist.com. That's Chris with the K. There's a link in the description to my website and as always, I hope that you have a great day.