1
00:00:00,120 --> 00:00:03,480
OK, now it's time to talk about the loops in script.

2
00:00:04,530 --> 00:00:06,810
Now, let's talk with the for loop.

3
00:00:07,140 --> 00:00:11,220
So, Vin, as datasets that we created previously know here.

4
00:00:11,490 --> 00:00:16,270
So this index is like that for the variable, which is I in.

5
00:00:16,740 --> 00:00:18,540
And then what the sequence?

6
00:00:18,900 --> 00:00:24,960
So for example, I use the braces like that and I looked in double quotation one.

7
00:00:26,040 --> 00:00:28,440
And Coma to arrest the.

8
00:00:29,960 --> 00:00:37,640
And three, OK, now do put the command you want, for example, Brent I.

9
00:00:39,610 --> 00:00:42,820
Then done, OK, so it is like that.

10
00:00:43,210 --> 00:00:47,250
For I in this sequence, dun dun dun.

11
00:00:47,440 --> 00:00:51,790
And inside it's equal the eye, so it will bring it on to three.

12
00:00:53,460 --> 00:00:54,050
No, listen.

13
00:00:54,390 --> 00:00:57,210
That's the test that you can see that is one to three.

14
00:00:57,660 --> 00:00:58,460
All right, cool.

15
00:00:59,100 --> 00:01:02,380
Now we can have a sequence and read from a fight.

16
00:01:02,400 --> 00:01:10,750
So for example, let's touch, let's do test, OK, and let's list the text and inside it.

17
00:01:10,750 --> 00:01:15,400
Let me put first one or two there.

18
00:01:16,760 --> 00:01:18,960
Values, blah blah blah.

19
00:01:19,140 --> 00:01:20,990
OK, whatever.

20
00:01:21,830 --> 00:01:26,390
Now here inside the US as edge, this time I want to bring this fight.

21
00:01:26,750 --> 00:01:30,620
But how did we learn to put undone?

22
00:01:31,720 --> 00:01:33,700
A comment inside the bash script.

23
00:01:34,210 --> 00:01:34,930
Yes, you are right.

24
00:01:34,960 --> 00:01:40,270
Using either that back quotation like that or the dollar sign with Beckett's.

25
00:01:40,780 --> 00:01:48,610
Let's put that quotation back single quotation and let's put cat, let's do text and then it's equal

26
00:01:48,610 --> 00:01:49,000
AI.

27
00:01:49,330 --> 00:01:50,800
So let's run, as did.

28
00:01:51,240 --> 00:01:55,900
Yeah, you can see that it will be first to third in the value of the fight.

29
00:01:58,290 --> 00:01:59,280
Also, we can have.

30
00:02:01,150 --> 00:02:07,300
Practical usage, like we want to bring a range of IP addresses so forth.

31
00:02:07,540 --> 00:02:12,880
Let's put this from one notes and then walked in.

32
00:02:13,210 --> 00:02:15,040
OK, now here echo.

33
00:02:15,670 --> 00:02:23,140
One two nine eight one six eight zero Dot the I and I.

34
00:02:23,170 --> 00:02:28,180
It's been one to three until we reached an OK, so let's hit and run to see what the values.

35
00:02:28,390 --> 00:02:29,110
You can see that.

36
00:02:29,140 --> 00:02:31,330
One two three four until we reach 10.

37
00:02:31,660 --> 00:02:35,740
OK, so this is a practical example to generate ideas, for example.

38
00:02:36,430 --> 00:02:38,230
OK, now this is for the poor.

39
00:02:38,530 --> 00:02:42,080
Now we have another syntax for the loops, which is the way loops.

40
00:02:42,130 --> 00:02:42,610
OK?

41
00:02:43,120 --> 00:02:46,480
Just as the programming languages, by the way, it is the same.

42
00:02:47,110 --> 00:02:48,310
So let's delete this.

43
00:02:49,600 --> 00:02:54,100
The syntax is like that while then put inside a brackets.

44
00:02:54,340 --> 00:02:59,410
Make sure the two follow as we learned from the events there as a spaces between here.

45
00:02:59,980 --> 00:03:04,360
OK, now here we can put that wild thing.

46
00:03:04,450 --> 00:03:04,870
OK.

47
00:03:04,900 --> 00:03:08,680
First, let's put out that this is just an example equal one.

48
00:03:09,310 --> 00:03:09,880
Or let's.

49
00:03:10,460 --> 00:03:12,040
But that's OK.

50
00:03:12,040 --> 00:03:19,420
Now that there are same counter is dexterity, which means less than 10, for example.

51
00:03:19,660 --> 00:03:22,840
And Mitchell, there is a spaces, then we will do.

52
00:03:22,990 --> 00:03:29,140
And after we finished done and inside the y loop, we want to equal, for example.

53
00:03:30,700 --> 00:03:31,420
The count up.

54
00:03:32,720 --> 00:03:33,200
OK.

55
00:03:33,500 --> 00:03:41,900
And after we bring the count up, we can use this command, which is putting two double brackets count

56
00:03:43,040 --> 00:03:44,900
plus plus like that.

57
00:03:45,410 --> 00:03:47,960
So this will increase the counter.

58
00:03:48,350 --> 00:03:55,600
Let's on it and you can see it will start showing one two three until we reach nine and 10 is not included

59
00:03:55,600 --> 00:03:56,330
it to include it.

60
00:03:56,570 --> 00:03:57,860
Actually, it's not less.

61
00:03:57,860 --> 00:04:00,000
Then it's less or equal.

62
00:04:00,050 --> 00:04:00,870
So, Ellie?

63
00:04:01,670 --> 00:04:02,090
OK.

64
00:04:02,840 --> 00:04:04,310
And save it now.

65
00:04:04,400 --> 00:04:05,690
Let's run again.

66
00:04:05,990 --> 00:04:08,450
Yeah, you can see one two until we reach 10.

67
00:04:09,170 --> 00:04:09,520
OK.

