1
00:00:01,680 --> 00:00:05,730
In this lecture we are starting from some not empathy for the other.

2
00:00:05,770 --> 00:00:08,430
For example I have three files.

3
00:00:08,440 --> 00:00:13,810
You know we see that the standard output stream is printed to them now.

4
00:00:13,840 --> 00:00:14,900
So let's change it.

5
00:00:14,920 --> 00:00:16,930
And I did check it out.

6
00:00:17,300 --> 00:00:19,770
Text.

7
00:00:20,010 --> 00:00:28,540
And if you check is inside output text you see that it contains output of a command.

8
00:00:29,520 --> 00:00:32,690
Now we can read the text on that stream to some file

9
00:00:39,210 --> 00:00:44,310
and we see that standard output stream is still default reprinted to do now.

10
00:00:44,490 --> 00:00:52,310
And when we check Eriphyle we see that it this empathy as there was no issue running at us.

11
00:00:52,460 --> 00:00:55,870
CONAN Now let's make some errors.

12
00:00:55,900 --> 00:01:02,290
I'm using percentage symbol for a month and I know that this action should throw an error because there

13
00:01:02,290 --> 00:01:03,860
is no such a file.

14
00:01:04,060 --> 00:01:12,020
And I really really read standard Aeros stream to error text file reseeded standard.

15
00:01:12,060 --> 00:01:16,040
There was nothing printed as we don't see anything printed to the terminal.

16
00:01:16,050 --> 00:01:22,250
Let's check at our file and we see the error message which was provided by a SQL month to standard or

17
00:01:22,350 --> 00:01:22,970
Stream.

18
00:01:23,020 --> 00:01:27,960
And then it had directed to this file.

19
00:01:27,960 --> 00:01:35,760
Now we want to correct both the standard output and standard error streams to one file and we can call

20
00:01:35,760 --> 00:01:37,920
it bold dot text.

21
00:01:42,940 --> 00:01:49,190
And we see the error message from standard error stream printed in that file.

22
00:01:50,830 --> 00:01:53,980
We can now redirect both streams to different files.

23
00:01:53,980 --> 00:02:03,160
So standard output to output dot text and standard error stream to error that text file

24
00:02:07,620 --> 00:02:08,650
and see

25
00:02:11,590 --> 00:02:18,920
that only after that text file has some output.

26
00:02:19,020 --> 00:02:20,140
Great.

27
00:02:20,300 --> 00:02:27,660
Now will they extend that output to some file and add or stream we can that I detect to standard output

28
00:02:31,590 --> 00:02:35,910
so to greater then the symbol unperson one

29
00:02:40,350 --> 00:02:43,860
and if we check output growth textfile

30
00:02:47,270 --> 00:02:53,240
we see error message from standard error stream which was already addicted to standard output stream

31
00:02:53,360 --> 00:02:59,900
and this output stream most had detected to file out with good backs.

32
00:03:00,260 --> 00:03:04,370
Now clear the screen and we can try some piping.

33
00:03:05,350 --> 00:03:12,510
Firstly I will check what files are in my directory and I can using redirection display a number of

34
00:03:12,510 --> 00:03:18,340
lines of some file if you want to do that using piping.

35
00:03:18,360 --> 00:03:26,900
We need to send output of cat command to WC come on through using pipe within those comments.

36
00:03:27,200 --> 00:03:28,950
Now let's make it more difficult.

37
00:03:29,000 --> 00:03:33,890
Despite only first five lines of output provided by catechumen

38
00:03:38,200 --> 00:03:44,340
and we can continue on display only last two lines of output provided by head command.

39
00:03:44,770 --> 00:03:48,180
So we see fault and FirstLine.

40
00:03:48,240 --> 00:03:51,430
Now let's count how many lines we have.

41
00:03:51,760 --> 00:03:59,190
And obviously if we have only two lines now and don't forget that we can detect final output of those

42
00:03:59,190 --> 00:04:01,410
piping commands into a file

43
00:04:06,500 --> 00:04:12,540
and recheck that file we see the same output.

44
00:04:13,160 --> 00:04:13,790
Yes.

45
00:04:13,820 --> 00:04:17,800
Number two as was previously displayed to the screen.

46
00:04:17,930 --> 00:04:18,360
Great.
