Now, let's start with biting and retaliation.
Now every program run from a command line has three data stream connected to it.
OK?
The first thing which is steady in a steady out, steady error so as to the end, which is the standard,
but this is data fit into the program.
So this is as an input standard output, which is sorted out to output from the program.
This is delivered to terminal.
And we have the city, which is standard.
This is the error messages.
And by default, it is too it is going to terminate.
So for the pipeline or by bank, we will use shift backs, yes.
Which is this one, the vertical line for redirection we would use either greater than or less than.
OK, now let's have more details about it.
So for example, I will use the command.
Now you can see that the last command, it would show us something like that.
OK.
So if I want to have this to be.
Recorded to a fight.
OK, so the output of the last to be recorded to a file, I would use the redirection.
So unless then space shift greater then which means it will be the output from here.
It will be considered in what to what.
For example, just the text press.
Enter now you can see the output hasn't been reached into that terminal.
OK.
But other than that, it has been written here now to show no such a thing.
How know I would use the exact command I could get?
This is the concatenation or thenation.
Get so -- the text and it would it would show us what has been recorded, as you can see.
The output of the last comment.
OK.
The same thing if I type eco double quotation.
Hi there.
And let's put it inside just to the text, for example.
OK, now if I Typekit just to the text, it will show us.
Hi there.
OK.
Just as we want.
Now imagine I have this fine and I do not want to write.
Write it over and over.
I won't type there and I want to put more commands to it so I can put the same command as you can see.
Hi there.
For the second time, for example, and I would use double greater than this time, so this means that
at the equal or the output of this command, which is high there for the second time and appended to
that test it.
Text this to fight.
Now here again, just to the text.
And you can see that.
Hi there.
Hi there for the second time.
You can see that it has backslash and or a new line.
Because by default, the eco command, it will bring less and it is considered backslash, end and backslash
and means a new line.
Now I can choose another thing which is using Dash E to skip the thing.
So this is not to print.
This is to put backslash whatever thing here, and you can use the end command so any and do not print
backslash and so it will not print a new line.
By the way, how did I know about it?
Again, just open it.
And here you can see all the options from the menu at Beach here and do not artwork detailing New Line,
which is backslash n e to enable interpretation of backslash skims like backslash e backslash.
Whatever.
OK.
Well, I'm assuming that you are familiar with these, if you are not, you can read more about it or
you can ask me.
No problem.
OK, now let's quit from here.
Now this is for the greater than the redirection.
Now what if I want to redirect from a fight?
OK, so the great then, as we saw that it will bring the output of the LSD and convert it to the text
and will do is double that greater then?
Which means appending.
Now, if I want to read a from a file, so for example, I will use the command WC now men w see.
You can see this is to print new line word and bytes count for each fight.
So this is for word count.
It stands for word count.
OK.
So if I type word count?
And the twist to the text.
It will show us like the following that this this fight has to.
Lines it and eight letters.
OK.
How did I know that?
Just the men you see.
And here you can see it with Brent in your line.
What?
How, however, how much line we have, how much work and how much bike counts.
Or, by the way, the character itself consider to be a bike.
So buy it here means that character.
OK.
And for this, we can use more options like that, see for the character dash, for the car's dash and
how many lines and whatever they do for words.
So if I type W. see Dash W four word and twist to the text, this will show us eight words inside the
cat two.
So if I can't hear, you can see that one two three four five six seven eight as you can see it worked.
OK, cool.
So far, so good.
Now we learned what is WC now?
What is there?
Is addiction here?
All right.
So it is clear this came first.
Now W see again.
Dash W now this time, as you can see, we booked for the WC command a file to read from, right?
Now what if I want to read from a specified using the redirection?
Not like that so I can use the list then, which means that this w c command needs an input and get
that input from what file, from text to the text.
OK, and it will show us again the same thing.
By the way, if you notice we have a different output because this is using the redirection.
But here it.
Brent, the eight character or eight word and the name of the flight.
Yes, so you can see that the output is different somehow.
OK, now what if I want to redirect the steady error, so clear the screen?
Now if I type this comment, you can see that it would show us command net fine because this is just
an arbitrary example or arbitrary command not found in very light.
Now what if I want to to see if it is not found?
Please don't show the error on that.
And for that, we would use something called redirection that I see the error.
So tool.
Which is.
The study, by the way.
Zero considered study in, but one considered to study.
Output and to consider the city or the standard.
OK.
Now I knew there is a lot of information here, but just for me, so too without any spaces redirection
to that slash device.
Slash, no.
Now here at this, the this is just another boy in town, it will point to nothing.
So run this command and see the era, which is this one.
Go and let it go to be inside here.
Dev.
NULL.
Which means don't bring the on here.
What did he there and then not here, which is just a void.
Nothing here.
OK, so enter.
You can see that this time the command that the command not found here, nor has it been put to the
terminal because we redirected the standard error to be to the dev null, which is to the void of the
system.
Now what if I don't again get this three?
The text, by the way, is the three.
The text is not found.
As you can see, no such file or directory.
Now, how should I print this?
And if there is no such file, I do not want to to be outwitted, to be printed to that terminal?
How should I do that?
Yes, you are correct.
As we learned previously.
So get this to read the text.
It is not fine if it is not found, but two or the standard error to be inside.
Dev null.
And you can see, you guessed it right.
And it is working correctly.
OK, now enough with the redirection, we learned that a dietitian greater than the greater than and
less than.
And we learned how to redirect their stand up to the dev null.
So the error will not be printed to the minute.
Now it's time to talk about biting.
Now, as we learned by being, is using the vertical line shift backslash, OK, or whatever it is and
your keyboard.
Now, for example, if I get.
This to the text.
OK.
You can see that it will start showing.
Hi there.
Hi there for the second time as we looked.
Now what if I want to count that number of words for this fight?
I would use pipe or, as we learnt, using the WC command.
Using the redirection or WC dash for the fight itself.
But there is another way to do it, by the way, using the pipeline.
So get this to the text and the output with the pipeline means the output of this command will be considered
in both for this command.
So this to the text and the output of this, which is the high they're high, therefore is the second
time would be input for the another command, which is the ability that's W.
OK, now if I do that, press to us it is working correctly.
So the output here.
Considered to be in, but for this moment.
OK, so this is what pipeline means, OK?
By the way, we can treat addiction again and again using by blinding, so kept this to the text.
And by blinding and output will be considered input for this and again, put this to be.
Result the text, for example.
And if I type, as you can see, OK to text here.
Get it to see what is inside it.
Yeah, it is walking one hundred percent.
All right.
So far, so good.
Now again, I recommend you to practice with me.
And practice what you have learned on whatever values, I would provide more exercises.
And the assignment for a simple exercise is just to practice what we have learned here.