1
00:00:01,540 --> 00:00:04,690
So that's an option to display statistics.

2
00:00:04,690 --> 00:00:12,540
And if it's not printed some for cases where news doesn't specify extension open our script

3
00:00:15,910 --> 00:00:25,450
and Firstly let's face displaying statistics we somehow need to tell all program what is a value of

4
00:00:25,450 --> 00:00:35,490
variable status because we know that if that value is around him the user has requested statistics.

5
00:00:35,610 --> 00:00:50,260
So before main or section referral out barometer the so right Desch the two AWC

6
00:00:57,390 --> 00:01:02,700
and that barometer is filled with assignment of all variables.

7
00:01:02,710 --> 00:01:09,450
That's where we can set the value of beshe variable stats.

8
00:01:09,530 --> 00:01:17,120
So basically we created all the variable stats that if you put the value of beshi variable this could

9
00:01:17,120 --> 00:01:22,700
be possible only thanks to using awk barometer Desch V.

10
00:01:23,540 --> 00:01:31,050
So now we can in the end section ask if value of Stud's a variable is equals to 1.

11
00:01:35,900 --> 00:01:45,270
So if that stat variable is equal to we can print Duzer some statistics.

12
00:01:49,160 --> 00:01:54,400
So largest file you can print that largest file

13
00:01:58,070 --> 00:02:03,710
is and it will be the value of variable Max name

14
00:02:13,040 --> 00:02:18,740
and then we can bring in its size using Mock's of variable

15
00:02:22,490 --> 00:02:26,720
and we could we can do that for megabytes.

16
00:02:32,600 --> 00:02:39,310
And this same this will do for the smallest file which is meant name

17
00:02:48,260 --> 00:02:54,230
and size is represented by a value of variable main

18
00:02:57,820 --> 00:03:00,250
Now we have statistics barred.

19
00:03:00,340 --> 00:03:05,040
So we need to also fix not displaying some for Casey's event.

20
00:03:05,050 --> 00:03:18,260
No extension was specified by user Visi did we have if statement why are we asking if extension is existing.

21
00:03:18,640 --> 00:03:23,560
And if yes we are counting some and counting.

22
00:03:23,770 --> 00:03:27,630
What is the largest and smallest file.

23
00:03:27,800 --> 00:03:34,340
So as this part of code we have written was only for case extension of our specified.

24
00:03:34,340 --> 00:03:39,070
We need to write new code for case extension of Vohs not set.

25
00:03:39,140 --> 00:03:46,890
So basically we can add a statement he says dead if statement above.

26
00:03:46,910 --> 00:03:50,040
For a case extension was specified.

27
00:03:50,480 --> 00:04:00,500
So pass output of ls l command for a specific location into our program where we select only files and

28
00:04:00,800 --> 00:04:09,200
we don't need to pass this into our program we seven specific extension because we know that no extension

29
00:04:09,200 --> 00:04:10,250
of all specified.

30
00:04:10,310 --> 00:04:14,780
So just pass this into org very heavy using parameter.

31
00:04:15,100 --> 00:04:18,020
We said value of all variables.

32
00:04:18,020 --> 00:04:18,470
That's

33
00:04:22,230 --> 00:04:28,080
And what will be in domain and and section of that program.

34
00:04:28,380 --> 00:04:33,770
The counting will be the same as for previous OC command which specified extension.

35
00:04:33,870 --> 00:04:40,800
So just copy debt levels part

36
00:04:46,560 --> 00:05:05,920
and pasted into our section.

37
00:05:06,160 --> 00:05:11,380
And that's pretty much all as accounting is the same.

38
00:05:11,380 --> 00:05:20,400
So we just copied all gmane and section from previews awk it looks horribly because if you have same

39
00:05:20,400 --> 00:05:22,770
code in two different places.

40
00:05:22,860 --> 00:05:25,560
But for now it is just ok.

41
00:05:28,630 --> 00:05:29,020
Yeah.

42
00:05:29,080 --> 00:05:30,250
Or it will never end.

43
00:05:30,370 --> 00:05:31,880
And we are looking at it.

44
00:05:32,410 --> 00:05:40,560
But for now it is it is just OK.

45
00:05:40,650 --> 00:05:48,450
So in order to do it we need to save our script Nahoum so save descript

46
00:05:51,180 --> 00:05:53,020
and we can test it.

47
00:05:53,280 --> 00:05:56,960
If I specify only a location with no extension

48
00:05:59,940 --> 00:06:03,010
I got desired information gained.

49
00:06:04,110 --> 00:06:10,110
And also would be really good to check if statistics can be displayed

50
00:06:17,500 --> 00:06:28,230
and there's even if we didn't specify extension we see statistics grade even on the other hand specifies

51
00:06:28,240 --> 00:06:29,690
some extent from

52
00:06:33,870 --> 00:06:40,620
let's say the specify extension can.

53
00:06:40,820 --> 00:06:48,910
It is working without any issue or script is basically dumb Only I don't like that we are using the

54
00:06:48,920 --> 00:06:51,800
same code on different places.

55
00:06:51,800 --> 00:06:54,430
So in this lecture we can fix it.
