1 00:00:00,120 --> 00:00:06,060 All right, now let's talk about the in shell scripting, OK, now this is an example, as you can see, 2 00:00:06,930 --> 00:00:15,510 or shell scripting a khosro while a nut dash alti in which mean less than. 3 00:00:16,440 --> 00:00:24,690 In which is this is the loop, the first loop, then be equal, then sign here, then will be greater 4 00:00:24,690 --> 00:00:28,250 than or equal zero as you can see to then. 5 00:00:28,360 --> 00:00:28,760 All right. 6 00:00:28,770 --> 00:00:33,360 So as you can see, why will, after we open it, do and after I finish. 7 00:00:33,360 --> 00:00:33,670 Done. 8 00:00:33,700 --> 00:00:35,880 OK, so do then. 9 00:00:36,780 --> 00:00:41,870 So if I run this actually well you can just copy and paste actually you can write it yourself. 10 00:00:42,060 --> 00:00:45,660 It's no big deal as the syntax is the most important thing here. 11 00:00:46,380 --> 00:00:48,690 So I how I can write a while loop. 12 00:00:49,080 --> 00:00:49,560 This is. 13 00:00:50,410 --> 00:00:55,870 The Syntex, other than that, it's up to you or it depends on what you need to do. 14 00:00:55,900 --> 00:01:00,820 All right, so let's go from here and let's run it and see. 15 00:01:00,820 --> 00:01:02,590 It will show us something like that. 16 00:01:02,920 --> 00:01:05,050 And they actually do something nice. 17 00:01:05,410 --> 00:01:07,330 Now, this is for the why loop. 18 00:01:07,330 --> 00:01:09,590 Now for the for loop, actually. 19 00:01:10,090 --> 00:01:15,400 Well, actually, there are other other loops like the engine or like the select, but I will show you 20 00:01:15,400 --> 00:01:16,680 just the four and one. 21 00:01:16,960 --> 00:01:18,110 So this is an example. 22 00:01:18,170 --> 00:01:18,570 OK. 23 00:01:20,150 --> 00:01:27,710 So I want to direct this first, because I forget to remove it so far, one in one, two or three, 24 00:01:27,890 --> 00:01:29,410 so do and then. 25 00:01:29,470 --> 00:01:35,990 OK, so which means this is the body of the pope and this is the second four and zero five two and then. 26 00:01:36,030 --> 00:01:36,380 Right. 27 00:01:36,390 --> 00:01:46,970 So you can see now if one is equal then two and this means and OK, VA is equal zero then break two 28 00:01:46,970 --> 00:01:49,250 ls equal for one part two. 29 00:01:49,360 --> 00:01:57,230 OK, so actually we used the break which means it will break from the inner loop, which is the inner 30 00:01:57,290 --> 00:01:58,020 for loop. 31 00:01:58,040 --> 00:02:01,620 OK, so let's run this and see what will happen. 32 00:02:02,180 --> 00:02:05,910 So if I run it it will show us one zero and one five. 33 00:02:05,930 --> 00:02:14,030 OK, so if I go again you can see that the first, the first loop go through in one, two, three. 34 00:02:14,060 --> 00:02:22,820 So the first number is one and we go inside the other two or the second loop I mean and for two in there 35 00:02:22,820 --> 00:02:29,070 also it will start with zero though, which means that no, they are not equal, as you can see, where 36 00:02:29,090 --> 00:02:32,720 one is not equal to two and two is not equal to zero. 37 00:02:33,020 --> 00:02:34,760 So which means it is. 38 00:02:34,790 --> 00:02:38,900 So we will print the one over to the same thing for that. 39 00:02:38,900 --> 00:02:41,750 To what actually, it doesn't matter about the logic. 40 00:02:42,080 --> 00:02:44,350 What is matter for you now is the syntax. 41 00:02:44,690 --> 00:02:46,150 So how to use a for loop? 42 00:02:46,160 --> 00:02:52,730 And here is the syntax for something or the variable in L.A., as you can see here, like these one, 43 00:02:52,730 --> 00:02:56,720 two, three, or ABC or anything and two. 44 00:02:56,720 --> 00:02:57,120 Done. 45 00:02:57,160 --> 00:03:02,420 OK, so after you done from the following, which means this is the end of the loop, OK, and it will 46 00:03:02,450 --> 00:03:06,290 still keep looping until these are completed. 47 00:03:06,320 --> 00:03:08,710 OK, so it will go through one, two, three. 48 00:03:08,780 --> 00:03:09,160 All right. 49 00:03:09,320 --> 00:03:11,590 Depends on the condition we have here. 50 00:03:11,930 --> 00:03:15,180 And by the way, we can use instead of break continue as well. 51 00:03:15,410 --> 00:03:17,930 Well, actually, it is basic programming and we. 52 00:03:17,930 --> 00:03:18,590 Thanks for what.