Now we will talk about field about before explaining death just died the same as me.
They will use eco command as an input for all program and in our program will print dollar sign zero
notice that we don't use double quotation marks for print command.
It is because we are not printing something.
But we are printing the value of a valuable dollar signs zero dollar sign zero pre-press that's all
fields in one record.
That is good to know that fields are by default separated by space so we can see that we have four fields
one two three and four.
So when we change or assign 0 to dollar sign on we see only first field.
String one piece not the dollar sign in or is completely different from dollar sign.
In bash in bash if you want to access some variable you need to prepend dollar sign but in awk we don't
do that.
Only if you are using dollar sign to our org.
Dead we are going to access fields if we want to display second fill.
We need to change our sign one two dollar sign to similarily we can access surd and forward.
Field.
Now let's create some file and let's call it table and it will be some basic table for employee where
we will store data about name age and work unit.
So I will quickly put some data here.
And I think it does enough.
We can't say.
And now let's print first field of each line using awk.
We don't need begin and end section
so just type all and will put in dollar sign one from file called Table
and the grade we see only names.
So here it all goes line by line and for each line it will print the value of variable dollar sign 1
which is the first field in our case names.
We can of course pass data to all using by
and we see the same result they now let's say if we want to display names and employee need only how
to read we can in a print section up Dorson city which represents unit
but this looks really ugly as there is no space between printed name and unit so we can just out in
a lot of sighing and dollar signs too.
So the dog stands three double quotation marks around space
and now it looks much better but we have also another option how to do space and it is using comma
and we can also put in some new String for example Hello.
And now we see that we have two spaces between each field.
Eevee remove Kamaz.
We see that we have only one space between printed words.
So just to mention here Kamaz are used usually when we want to separate the variables with space.