1
00:00:01,070 --> 00:00:09,240
Let's print something out in this lecture we will use only big in section and in that section inside

2
00:00:09,280 --> 00:00:10,110
curly braces.

3
00:00:10,110 --> 00:00:12,130
We will print Hello.

4
00:00:12,270 --> 00:00:13,210
So hello.

5
00:00:13,230 --> 00:00:15,220
Inside the book for the Asian marks

6
00:00:18,100 --> 00:00:21,510
and we don't specify any file here.

7
00:00:25,390 --> 00:00:26,880
What has happened here.

8
00:00:27,020 --> 00:00:30,500
Begin the section in the room before processing any line.

9
00:00:30,540 --> 00:00:38,350
The main body of AWC and we don't have here any iron because we didn't provide input file or output

10
00:00:38,350 --> 00:00:39,620
from eco command.

11
00:00:39,880 --> 00:00:44,170
So it is completely OK to use only begin section.

12
00:00:44,170 --> 00:00:48,120
Basically what we did is same as if writing ICO.

13
00:00:48,230 --> 00:00:54,840
Hello.

14
00:00:54,890 --> 00:01:00,590
So let's look also another section of all program here.

15
00:01:00,890 --> 00:01:09,740
We are using the main body section of AWC which is process for each provided line and each time I push

16
00:01:09,850 --> 00:01:20,380
enter it means each time I for this example provide empty line org will print Hello.

17
00:01:20,540 --> 00:01:21,040
Great

18
00:01:28,720 --> 00:01:33,910
but what would have happened if we used now only N.S.

19
00:01:36,840 --> 00:01:37,600
and S..

20
00:01:37,630 --> 00:01:42,420
Is it only when Alk. processed all the lines

21
00:01:51,340 --> 00:01:52,830
and scenes.

22
00:01:52,840 --> 00:01:58,200
Here if you don't know where it is at the end of it'll never print Hello.

23
00:01:58,210 --> 00:02:02,600
So we need to terminate using control-C.

24
00:02:02,620 --> 00:02:09,180
Now let's provide some input into all using eco command eco.

25
00:02:09,420 --> 00:02:11,800
One two three four.

26
00:02:12,040 --> 00:02:13,150
Then pipe

27
00:02:16,980 --> 00:02:24,930
then keyboard awk and inside main body section will print hello.

28
00:02:26,310 --> 00:02:28,600
Dead means dead.

29
00:02:28,610 --> 00:02:29,720
All the print Hello.

30
00:02:29,720 --> 00:02:39,380
For each record for each line it finds and since we have only one line it will print hello one time

31
00:02:42,460 --> 00:02:43,330
if we provide.

32
00:02:43,340 --> 00:02:47,570
Instead of course some file it then lines we would see printed.

33
00:02:47,600 --> 00:02:49,910
Hello ten times.

34
00:02:50,300 --> 00:03:02,000
So let's create some file called Hello dot text and create fuel lines for example.

35
00:03:02,000 --> 00:03:02,810
First line

36
00:03:06,350 --> 00:03:18,990
second line second line for line and fifth line.

37
00:03:19,000 --> 00:03:27,330
Now let's print hello for each line for each record of provide the input file Hello dot text

38
00:03:40,580 --> 00:03:41,490
and AVC.

39
00:03:41,530 --> 00:03:44,770
Hello printed five times.

40
00:03:44,770 --> 00:03:49,960
Great we can provide data to all.

41
00:03:49,960 --> 00:03:53,540
Also using 5 so we will use by now

42
00:04:04,370 --> 00:04:07,430
and the output is decem great.

43
00:04:09,430 --> 00:04:19,030
Now to show clearly how begin and N.S. behaves we will specify Firstly begin section and we will print

44
00:04:19,030 --> 00:04:26,380
here begin part in the main body will print again.

45
00:04:26,470 --> 00:04:27,070
Hello

46
00:04:43,440 --> 00:04:45,300
you can see that begin.

47
00:04:45,300 --> 00:04:48,630
Part was performed before the main section started.

48
00:04:48,640 --> 00:04:56,850
Operated commands for each line where it prints hello so the printed beginning part 1 time and as we

49
00:04:56,850 --> 00:05:02,380
have 5 lines in all the text we see 5 time printed.

50
00:05:02,410 --> 00:05:04,280
Hello.

51
00:05:04,510 --> 00:05:07,280
Now we can add also and S..

52
00:05:07,750 --> 00:05:13,020
And in a dead end section will print and bar

53
00:05:20,480 --> 00:05:24,500
and after the main org section printed 5 time.

54
00:05:24,620 --> 00:05:25,300
Hello.

55
00:05:25,460 --> 00:05:29,300
We see also printed and anti-pot great.
