1
00:00:01,080 --> 00:00:09,080
Now we will talk about field about before explaining death just died the same as me.

2
00:00:09,170 --> 00:00:19,200
They will use eco command as an input for all program and in our program will print dollar sign zero

3
00:00:22,750 --> 00:00:26,540
notice that we don't use double quotation marks for print command.

4
00:00:26,640 --> 00:00:28,920
It is because we are not printing something.

5
00:00:28,980 --> 00:00:36,290
But we are printing the value of a valuable dollar signs zero dollar sign zero pre-press that's all

6
00:00:36,290 --> 00:00:38,750
fields in one record.

7
00:00:38,750 --> 00:00:46,880
That is good to know that fields are by default separated by space so we can see that we have four fields

8
00:00:47,270 --> 00:00:49,740
one two three and four.

9
00:00:51,610 --> 00:00:58,940
So when we change or assign 0 to dollar sign on we see only first field.

10
00:00:58,990 --> 00:01:05,530
String one piece not the dollar sign in or is completely different from dollar sign.

11
00:01:05,530 --> 00:01:14,740
In bash in bash if you want to access some variable you need to prepend dollar sign but in awk we don't

12
00:01:14,830 --> 00:01:15,960
do that.

13
00:01:15,970 --> 00:01:19,300
Only if you are using dollar sign to our org.

14
00:01:19,530 --> 00:01:26,170
Dead we are going to access fields if we want to display second fill.

15
00:01:26,410 --> 00:01:35,200
We need to change our sign one two dollar sign to similarily we can access surd and forward.

16
00:01:35,230 --> 00:01:37,560
Field.

17
00:01:37,580 --> 00:01:47,780
Now let's create some file and let's call it table and it will be some basic table for employee where

18
00:01:47,780 --> 00:01:53,870
we will store data about name age and work unit.

19
00:01:54,710 --> 00:01:57,700
So I will quickly put some data here.

20
00:02:22,400 --> 00:02:24,660
And I think it does enough.

21
00:02:25,040 --> 00:02:25,990
We can't say.

22
00:02:27,830 --> 00:02:34,700
And now let's print first field of each line using awk.

23
00:02:34,730 --> 00:02:37,420
We don't need begin and end section

24
00:02:40,370 --> 00:02:50,180
so just type all and will put in dollar sign one from file called Table

25
00:02:54,570 --> 00:02:57,190
and the grade we see only names.

26
00:02:57,480 --> 00:03:05,520
So here it all goes line by line and for each line it will print the value of variable dollar sign 1

27
00:03:05,610 --> 00:03:09,570
which is the first field in our case names.

28
00:03:11,590 --> 00:03:16,980
We can of course pass data to all using by

29
00:03:32,540 --> 00:03:43,360
and we see the same result they now let's say if we want to display names and employee need only how

30
00:03:43,360 --> 00:03:54,180
to read we can in a print section up Dorson city which represents unit

31
00:04:00,140 --> 00:04:08,600
but this looks really ugly as there is no space between printed name and unit so we can just out in

32
00:04:08,790 --> 00:04:11,850
a lot of sighing and dollar signs too.

33
00:04:11,950 --> 00:04:16,950
So the dog stands three double quotation marks around space

34
00:04:19,990 --> 00:04:28,900
and now it looks much better but we have also another option how to do space and it is using comma

35
00:04:45,440 --> 00:04:50,020
and we can also put in some new String for example Hello.

36
00:04:50,390 --> 00:04:55,180
And now we see that we have two spaces between each field.

37
00:04:57,390 --> 00:05:01,690
Eevee remove Kamaz.

38
00:05:01,890 --> 00:05:06,310
We see that we have only one space between printed words.

39
00:05:07,390 --> 00:05:15,110
So just to mention here Kamaz are used usually when we want to separate the variables with space.
