Hey everybody Welcome to Part Five of the Windows command line mini module.
So in this view we're gonna go over the standard input an output an error of an application.
So every application has three types of standards.
So there's the standard input which is labeled with the number zero standard output just level one standard
error label with two.
Now it's important to keep these numbers in the back of your mind they're always there and they tend
to be universal so standard error tends to always be two on most systems so we take a quick look at
standard input so we've already actually seen this used before.
So when we did the sort and then grabbing the input of data up to 60.
So with this is no different than having that.
So that's how they're used.
So they're used with the redirection in the pipes to tell us what type of data we want.
So in this particular case we're diving into the standard input but that's the only thing we would be
doing into an application's input.
So that's why it drops off with the zero.
Now standard output is something we've actually already been doing.
So echo tests into text text.
So if you remember this it creates the word test within text.
However if we put the one there because echo test is its output is just the word test.
If we add the one there we're telling it specifically we want the output of that command and piping
it into or redirecting it into the text or texting.
So if we run that we'll see it's the same information that we were seeing before which is good.
Now for error.
Now if you remember D.R. our slash why we got our error.
So what this is doing is this is pushing the text of the error message through standard error which
in the command line it will just print to the screen as well as the standard output.
So from a user's point of view you just have to know that it's an error message from a programmatic
standpoint.
You would have to know that it's coming from standard error now a way to pull from standard error is
the two and then we're piping it into errors that takes time.
Now we run this.
We see that there's no data because it's not the command line is not taking standard error and it's
dumping into a file.
So when we open this up we see our standard error.
Now this can be used for grabbing an application.
So if we wanted to run DLR and only grab the errors but print the rest of the screen we would do this.
So we see that we print to the rest of the screen.
There weren't any errors.
So the file is actually empty now if you wanted to run an application in general you would run no application.
We want to grab the standard error and we want to pipe that.
No.
Right.
So no just means we're gonna get rid of it.
So no means nothing.
So if we did the IRR Slash Y it just wouldn't produce anything no file no nothing because null is a
dead zone.
So it's just dumping it into oblivion just deleting it.
So understanding these three types of inputs is important for an application because depending on what
you're doing on the command line you may want the error specifically maybe you're running a Web scanner
and you're looking for that error message.
So this would be a useful place where you'd ignore standard output and maybe dump standard output to
error or not.
So if we did this we did one now we'd be standing standard output to know which provides us nothing
but it still ran in if we ran the failure we should just see the failure.
Perfect.
So go out and play around with this.
Get get used to the standard input output an error and use it in conjunction with the previous video
on bypass.